The order must be reversed to reflect the greed.
DB<8> x 'eeeA1234eB' =~ /(e+|e{0})(.)/ 0 'eee' 1 'A' DB<9> x 'A1234eB' =~ /(e+|e{0})(.)/ 0 '' 1 'A' DB<10> x 'A1234eB' =~ /(e+)(.)/ 0 'e' 1 'B' DB<11>
Thanks!
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
Improved demo code
In reply to Re^5: Greedy modifier found to be working non-greedy in a named group
by LanX
in thread Greedy modifier found to be working non-greedy in a named group
by rkabhi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |