in reply to Re: ^\s not equal \S?
in thread ^\s not equal \S?
[^\s\w] means neither spaces nor words, or, everything but spaces and words, where
[\S\W] means non-spaces AND non-words, and since a space is a non-word, the meaning is similar to "non-spaces and spaces".
However, ^\s and \S should be the same, so...
would do the same thing as...$phrase =~ s/[^\s*\w*]//g;
$phrase =~ s/[\S]|[\W]|[^*]//g;
Update: No, it wouldn't. :: smacks self in head ::
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: ^\s not equal \S?
by SavannahLion (Pilgrim) on Dec 04, 2003 at 18:20 UTC |