CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Fun With Perl: Perl Golf: Re: [RedRum] Phone Number Input Fix Golf: Edit Log



unknownSym
stranger

Feb 12, 2002, 11:00 AM


Views: 36521
Re: [RedRum] Phone Number Input Fix Golf

I believe this will work: s/\D*//;s/(\d{3})(\d{3})/\($1\) $2-/;print;

43 chars.


Nevermind. I forgot about the length requirement.


(This post was edited by unknownSym on Feb 12, 2002, 11:01 AM)


Edit Log:
Post edited by unknownSym (stranger) on Feb 12, 2002, 11:01 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives