hello...
I am trying to write regular expression for the phone numbers to be in the format..
(000) 000-0000 and (000)000-0000
the difference being space after brackets.
I have used this expression and it did not work..I think I am missing a pace or brackets..unabl e to figure...
this phrase does not validate both the formats..
can somebody please tell me the correct phrase..thank you
I am trying to write regular expression for the phone numbers to be in the format..
(000) 000-0000 and (000)000-0000
the difference being space after brackets.
I have used this expression and it did not work..I think I am missing a pace or brackets..unabl e to figure...
Code:
var phoneREX = /^\(\d\d\d\) \d\d\d-\d\d\d\d | \(\d\d\d\)\d\d\d-\d\d\d\d$/;
can somebody please tell me the correct phrase..thank you
Comment