Do we need a mode for this? Getting all the matches? Its possible to do with an embedded code block (as I think you know :-)
perl -le"$_='bbaabb'; /b*(?{print '.' x $-[0],qq<($&)>})(*FAIL)/g" (bb) (b) () .(b) .() ..() ...() ....(bb) ....(b) ....() .....(b) .....() ......()
On earlier perls than mine you can spell (*FAIL) as (?!)
In reply to Re^4: zero-length match increments pos() (saner)
by demerphq
in thread zero-length match increments pos()
by Errto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |