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
In Section
Seekers of Perl Wisdom