Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 ( #1018796=note: print w/ replies, xml ) Need Help??


in reply to Re^3: A regex that only matches at offset that are multiples of a given N?
in thread A regex that only matches at offset that are multiples of a given N?

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.


Comment on Re^4: A regex that only matches at offset that are multiples of a given N?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018796]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2014-08-29 08:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (277 votes), past polls