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 reply to Re: RegEx Headaches
by bart
in thread RegEx Headaches
by oryx3
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |