'xyz abc 123 abc pqr abc get this bit def ijk abc lmn' =~ /.*abc(.*?)d +ef/sm; print ">$1<";
Prints:
> get this bit <
which is what I understood you to want.
Update: Ah, I see it did do what you want. ;)
In reply to Re^3: How do I match the closest of repeated strings?
by GrandFather
in thread How do I match the closest of repeated strings?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |