in reply to
Replacing numbers using regular expression
s/\d/\#/g;
substitute d class with hash, globally in string. works as scalar string, float, or int.
tested with:
perl -e '$i=345.12; $i =~ s/\d/\#/gi; print "$i\n";'
amt.
perlcheat
Comment on
Re: Replacing numbers using regular expression
Download
Code
In Section
Seekers of Perl Wisdom