|Pathologically Eclectic Rubbish Lister|
^\s not equal \S?by SavannahLion (Pilgrim)
|on Dec 04, 2003 at 08:31 UTC||Need Help??|
SavannahLion has asked for the wisdom of the Perl Monks concerning the following question:
I'm hoping someone can clarify some behavior for me.
I have the following two code blocks I'm fiddling with. First I tried the following block.
For some reason, the regex destroys the entire line. Therefor, print just prints a blank line. So after some fiddling I came up with the following block.
Which does exactly what I was aiming for in the first place. It produces the following line: This is a test using quotes of two different types All quotes, periods, and everything else has been stripped.
In my llama book it states that [^\s] is the same as \S and [^\w] is the same as \W. Now, from what I understand so far, the first block of code should have worked, but it didn't.
Is it fair to stick a link to my site here?
Thanks for you patience.