in reply to Re^2: Why doesn't this regex work? ( lookaround backtracking pos)
in thread Why doesn't this regex work? (Solved!)
Took me a few dozen looks, I started to compose some funny(wrong) answers some 3-4 times
The experimental (??{ code }) feature looks kinda neat
perl -le " $_ = shift; s{(\d+)\d\s\K(?=(??{$1+1})\d\s)}{\n}g; print " +"11 12 21 22 32 33 41 44" 11 12 21 22 32 33 41 44
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Why doesn't this regex work? ( lookaround dynamic postponed pattern (??{ code })
by BrowserUk (Patriarch) on Aug 15, 2013 at 12:44 UTC |