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?
wish it were so simple:
$a = join'',map{ ('a'..'z')[rand 26] } 1 .. 1000;; print "$-[0]: $1" while $a =~ m[(?:.{4})*(?=(aa..))]g;; 0: aawx 404: aawx 405: aadz 481: aadz print "$-[0]: $1" while $a =~ m[(?:.{4})*(?=(gg..))]g;; 0: gghn 208: gghn 211: ggyj 955: ggyj
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: A regex that only matches at offset that are multiples of a given N?
by tobyink (Canon) on Feb 13, 2013 at 17:11 UTC | |
by BrowserUk (Patriarch) on Feb 13, 2013 at 17:18 UTC | |
by BrowserUk (Patriarch) on Feb 16, 2013 at 00:29 UTC | |
|
Re^3: A regex that only matches at offset that are multiples of a given N?
by choroba (Cardinal) on Feb 13, 2013 at 16:31 UTC | |
by BrowserUk (Patriarch) on Feb 13, 2013 at 16:36 UTC | |
|
Re^3: A regex that only matches at offset that are multiples of a given N?
by ikegami (Patriarch) on Feb 14, 2013 at 07:50 UTC |