|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re: A regex that only matches at offset that are multiples of a given N?by 7stud (Deacon) |
| on Feb 16, 2013 at 05:41 UTC ( #1019012=note: print w/ replies, xml ) | Need Help?? |
|
Help! If I use the construct (?(condition)yes-pattern) in a regex, and the condition is (?{1}), i.e. always true, the output is as expected:
But when I use the condition (?{pos() % 2 == 0}), I expect the same output, but I don't get it:
Three matches? Also, I notice the x modifier doesn't work with a conditional pattern:
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||