in reply to RegEx Headaches
You can do
This uses lookahead, which will match the rest of the string, but not consume it.@numbers = /(\d+)(?=\.)(?=.*\.xml$)/g
If you don't need the extra check, you can just do
@numbers = /(\d+)/g
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: RegEx Headaches
by oryx3 (Novice) on Jun 19, 2013 at 18:59 UTC | |
by kennethk (Abbot) on Jun 19, 2013 at 19:16 UTC |
In Section
Seekers of Perl Wisdom