Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I need to get the users input for tech support, I have a dialer that will call them back for the support, but the phone number can only be ten digits long. So first I want to get ONLY the numbers, then I can play with it, like if it is 11 digits in length, and the first digit is a 1 then I will have it drop off the one. My problem is that I cannot get it to work, it does not strip off anything.
Does this not work: $phone =~ s/!(^\d+)//g; I've searched a few sites, including this one, usually for the terms, "phone number only", "numbers only" "strip everything but numbers" and so forth, but found nothing.
thx, Richard In reply to Numbers only in a string by powerhouse
|
|