in reply to Pattern matching fails because of special characters
> 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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Pattern matching fails because of special characters
by AnomalousMonk (Archbishop) on Jun 10, 2019 at 01:02 UTC | |
by LanX (Saint) on Jun 10, 2019 at 01:25 UTC |