
September 29th, 2012, 12:14 AM
|
|
Registered User
|
|
Join Date: Sep 2012
Posts: 1
Time spent in forums: 21 m 34 sec
Reputation Power: 0
|
|
|
Regex for money values help
I am trying to get a regex to get values like:
$28.0k
$2.8k
$5.2M
I want the whole string in a variable not just the number i need the $ and the M or k included.
I am currently trying
Code:
my $value = $data =~ m/(\\\$\d+\.\d+M|k)/;
but this doesn't seem to be getting the correct value, all help is appreciated.
|