Add ^ as
[^a-zA-Z0-9]
Though there are probably a number of different ways to approach RegEx…
Wags ;)
WagsWorld
Hebrews 4:15
Ph(primary) : 408-914-1341
Ph(secondary): 408-761-7391
On Dec 31, 2021, 20:22 -0800, Piper H , wrote:
> Hello
>
> I know [a-zA-Z0-9] means words and numbers.
> But what's t
I queried the doc and found this is what I wanted.
[^a-zA-Z0-9]
Thank you.
On Sat, Jan 1, 2022 at 12:38 PM Adam Hopkins
wrote:
> If you add an underscore (the equivalent of \w): [a-zA-Z0-9*_*]
>
> Then \W is the opposite.
>
>
> If you wanted to not match [a-zA-Z0-9]
>
> You could do
>
> $string
If you add an underscore (the equivalent of \w): [a-zA-Z0-9*_*]
Then \W is the opposite.
If you wanted to not match [a-zA-Z0-9]
You could do
$string !~ m/[a-zA-Z0-9]/
On Fri, Dec 31, 2021 at 10:23 PM Piper H wrote:
> Hello
>
> I know [a-zA-Z0-9] means words and numbers.
> But what's the re
Hello
I know [a-zA-Z0-9] means words and numbers.
But what's the reverse of this regex?
Thank you.
Yes I understand now. For some reason I missed the
missing quotes in the original post and the word token
came to mind.
$ perl -MO=Deparse foo.plx
BEGIN { $^W = 1; }
use diagnostics;
sub abc {
use warnings;
use strict 'refs';
'abc.';
}
sub e {
use warnings;
use strict 'ref
On 3/8/07, oryann9 <[EMAIL PROTECTED]> wrote:
snip
Why is $_=abc.e.i short for
$_ = 'abc' . 'e' . 'i';
snip
from "Programming Perl 3rd Edition":
bareword
A word sufficient ambigious to be deemed
illegal under use strict 'subs'. In the
absence of that stricture, a barew
> $_=abc.e.i;
>
> This is short for:
>
> $_ = 'abc' . 'e' . 'i';
>
> Which is the same as saying:
>
> $_ = 'abcei';
>
Why is $_=abc.e.i short for
$_ = 'abc' . 'e' . 'i';
Is it b/c each group of characters is a 'token'
including the periods?
abc => token
. =>
I have to say - I am totally enamored with regex. Color me
'goober'. I just think that is a beautiful, concise, elegant way to
make a substitution. All of that capability in one short string of
characters... No if, then, else construct. Just - capture what is
there; if it matches a .\w
On 3/7/07, Jennifer Foo <[EMAIL PROTECTED]> wrote:
$_=abc.e.i;
This is short for:
$_ = 'abc' . 'e' . 'i';
Which is the same as saying:
$_ = 'abcei';
Thanks.I never knew that it can write a string like this way.
You probably shouldn't though. It is a carry over from the earli
$_=abc.e.i;
This is short for:
$_ = 'abc' . 'e' . 'i';
Which is the same as saying:
$_ = 'abcei';
Thanks.I never knew that it can write a string like this way.
_
FREE Email @ Fadmail.com - http://www.fadmail.com
--
Jennifer Foo wrote:
> Someone posted this regex question which I can't understand for.
>
> perl -e '$_=abc.e.i;
> s/(\.\w+)?$/.out/;
> print;'
>
> the result is: abcei.out
>
> Why is this?Please help explain it.Thanks!
$_=abc.e.i;
This is short for:
$_ = 'abc' . 'e' . 'i';
On 3/7/07, Jennifer Foo <[EMAIL PROTECTED]> wrote:
Someone posted this regex question which I can't understand for.
perl -e '$_=abc.e.i;
s/(\.\w+)?$/.out/;
print;'
the result is: abcei.out
Why is this?Please help explain it.Thanks!
I think you will be less confused if you change the
Someone posted this regex question which I can't understand for.
perl -e '$_=abc.e.i;
s/(\.\w+)?$/.out/;
print;'
the result is: abcei.out
Why is this?Please help explain it.Thanks!
_
FREE Email @ Fadmail.com - http://www.fa
13 matches
Mail list logo