S
silverfish
Hi,
Perl newbie here. I need to extact a numeric value from a string that
looks like this,
<b>12,543</b>
what I did so far,
# .. some codes to extract the above string, <b>12,543</b> to $1
$number = $1;
$number =~ tr/,//; # to remove comma
$number =~ m/(\d+)/; # to get only numeric value
print("$number\t");
unfortunately, the output was <b>12543</b> ..
any help will be appreciated! thanks.
Perl newbie here. I need to extact a numeric value from a string that
looks like this,
<b>12,543</b>
what I did so far,
# .. some codes to extract the above string, <b>12,543</b> to $1
$number = $1;
$number =~ tr/,//; # to remove comma
$number =~ m/(\d+)/; # to get only numeric value
print("$number\t");
unfortunately, the output was <b>12543</b> ..
any help will be appreciated! thanks.