in reply to How do I match the closest of repeated strings?
m{ .* # match as late as possible ( ^abc$ # the abc .*? # everything up to ^def$ # the def ) }smx
Untested, and will be confused if there are mulitple def lines. In that case it helps to tokenize the input first (for example reading line by line)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I match the closest of repeated strings?
by Anonymous Monk on Sep 29, 2008 at 09:27 UTC |