Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Numbers only in a stringby saberworks (Curate) |
on Sep 08, 2005 at 16:01 UTC ( [id://490251]=note: print w/replies, xml ) | Need Help?? |
s/[\D]+//g;
\D is the opposite of \d so it will replace anything that's not a digit.
In Section
Seekers of Perl Wisdom
|
|