http://qs321.pair.com?node_id=1040293


in reply to Re: RegEx Headaches
in thread RegEx Headaches

... more complicated than necessary.

Since the decimal digit groups appear to be unambiguously delimited to begin with, no need to worry about a delimiter or capture group at all:

>perl -wMstrict -le "$_ = 'ActionLogs.1.22.333.4.5.6.7.8.987.xml'; ;; my @digit_groups = m{ \d+ }xmsg; printf qq{'$_' } for @digit_groups; " '1' '22' '333' '4' '5' '6' '7' '8' '987'