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