http://www.perlmonks.org?node_id=1019020


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