in reply to A regex that only matches at offset that are multiples of a given N?
will work if you're okay with overlapping matches. If not, you could resort to using the slower/\G(?:.{4})*(?=fred(....))/sg
/fred(?(?{ pos % 4 != 0 })(?!))(....)/sg
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A regex that only matches at offset that are multiples of a given N?
by smls (Friar) on Feb 14, 2013 at 11:26 UTC | |
by 7stud (Deacon) on Feb 14, 2013 at 19:49 UTC | |
by smls (Friar) on Feb 14, 2013 at 21:16 UTC | |
|
Re^2: A regex that only matches at offset that are multiples of a given N?
by 7stud (Deacon) on Feb 14, 2013 at 18:57 UTC | |
by smls (Friar) on Feb 15, 2013 at 12:27 UTC |