Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by tobyink (Abbot)
on Feb 16, 2013 at 07:57 UTC ( #1019020=note: print w/ replies, xml ) Need Help??


in reply to Re: 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?

/(?(?{pos() % 2 == 0})(b[xyz]))/g

I think you want to explicitly back-track in the no condition...

/(?(?{pos() % 2 == 0})(b[xyz])(*FAIL))/g
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name


Comment on Re^2: A regex that only matches at offset that are multiples of a given N?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2015-07-05 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls