Perl-Sensitive Sunglasses | |
PerlMonks |
Re^3: Incorrect Pattern Matching Behaviorby hv (Prior) |
on Mar 22, 2006 at 02:03 UTC ( [id://538378]=note: print w/replies, xml ) | Need Help?? |
The problem is in the implementation of this clause:
Your regular expression is getting parsed as:
To achieve your aims, you need to tell perl where your list of alternates starts and ends, with capturing (...) or non-capturing (?:...) parens:
I'd also recommend using the extended layout permitted by the //x flag for long expressions like this. Hope this helps, Hugo
In Section
Seekers of Perl Wisdom
|
|