How can I match a phone number with a regex? [closed]
- by Zerobu
Possible Duplicate:
A comprehensive regex for phone number validation
I would like a regular expression in this format. It Must match one of the following formats:
(###)###-####
###-###-####
###.###.####
##########
Strip all whitespace. Make sure it's a valid phone number, then (if necessary) translate it to the first format listed above.