Possible Duplicate:A comprehensive regex for phone number validation
Whats the regex for
xxx-xxx-xxxxor(xxx)xxx-xxxx
I can create regex for the first one with
/^\d{3}-\d{3}-\d{4}$/
but how to add rule in this so it can also handle the second one?
No comments:
Post a Comment