Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1018796]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-26 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found