Perl Monk, Perl Meditation | |
PerlMonks |
Re^4: A regex that only matches at offset that are multiples of a given N?by smls (Friar) |
on Feb 14, 2013 at 21:16 UTC ( [id://1018796]=note: print w/replies, xml ) | Need Help?? |
Ah yes, you need to add parenthesis after the pos (to make sure it is interpreted as a function without parameters): /fred(?(?{ pos() % 4 != 0 })(?!))(....)/sg I fixed that locally while testing ikegami's regex but then forgot about it when reporting back, sorry.
In Section
Seekers of Perl Wisdom
|
|