Possible Duplicate:
A comprehensive regex for phone number validation
I am pretty close to a full regex that I need. However I can't seem to get an optional white space allowed.
Regex
^(\(?\d{3}\)?\-?\d{3}\-?\d{4})$
Requirements - Only these four
111-111-1111 - Works
(111)111-1111 - Works
(111) 111-111 - Doesn't Capture
1111111111 - Works
How do I add an optional space after the parenthesis?