$ perl -E 'my $price = "-1.500"; say for $price =~ m/^-\d+\.(\d*)$/g' 500
If your eyes hurt after you drink coffee, you have to take the spoon out of the cup.
-Norm Crosby
In reply to Re: regex to match numbers after decimal
by NetWallah
in thread regex to match numbers after decimal
by doubledecker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |