\d* also matches 0 digits
resultmy $str = "I have 2 numbers: 53147"; if ( $str =~ /(.*?)(\d+)/ ) { print "<$1> <$2>\n"; } else { print "FAIL\n"; }
<I have > <2>
In reply to Re: Regex Minimal Quantifiers
by huck
in thread Regex Minimal Quantifiers
by pr33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |