/(?(?{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
In reply to Re^2: A regex that only matches at offset that are multiples of a given N?
by tobyink
in thread A regex that only matches at offset that are multiples of a given N?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |