in reply to Re^2: A regex that only matches at offset that are multiples of a given N? (Update:almost perfect!)
in thread A regex that only matches at offset that are multiples of a given N?
Maybe you could avoid the double matching, by manually incrementing pos() after each successful match - either inside the body of the while loop, or at the end of the regex using (?{pos() += 4}) ?
(Just an idea, haven't tested it.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: A regex that only matches at offset that are multiples of a given N? (Update:almost perfect!)
by BrowserUk (Patriarch) on Feb 13, 2013 at 18:45 UTC | |
by smls (Friar) on Feb 13, 2013 at 19:29 UTC | |
by BrowserUk (Patriarch) on Feb 13, 2013 at 20:11 UTC | |
by smls (Friar) on Feb 13, 2013 at 21:11 UTC | |
by BrowserUk (Patriarch) on Feb 13, 2013 at 23:12 UTC |