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'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: RegEx Headaches
by kcott (Bishop) on Jun 22, 2013 at 22:30 UTC |
In Section
Seekers of Perl Wisdom