> while($_=~/\A([S\-\+XIO]+)\z/g)
You can't escape with backslashes inside a character class. °
Put the minus at the end and drop all backslashes, unless you want to match '\'.°
See also Re: regex question Underscores, lines and paratheses.
HTH! :)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
°) thanks to AnomalousMonk++ for correcting me!
In reply to Re: Pattern matching fails because of special characters
by LanX
in thread Pattern matching fails because of special characters
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |