Hi everyone,
I'm trying to use regular expressions in javascript to validate an international phone number, and I can't get the regular expression to test for +.
The pattern I'm using is:
/^(\+)\d{1,3} [\d ]+\d$/
I think this is a bug because if I use the following pattern, it accepts $nnn nnn nnnnn:
/^(\$)\d{1,3} [\d ]+\d$/
So it seems there's a problem escaping the + character - I'ev also tried using hex values, ie \x2b which also doesn't work.
Anyone had similar problems? Any help would be much appreciated.
Thanks.
Adrian.
aliles@arrowuk.com
I'm trying to use regular expressions in javascript to validate an international phone number, and I can't get the regular expression to test for +.
The pattern I'm using is:
/^(\+)\d{1,3} [\d ]+\d$/
I think this is a bug because if I use the following pattern, it accepts $nnn nnn nnnnn:
/^(\$)\d{1,3} [\d ]+\d$/
So it seems there's a problem escaping the + character - I'ev also tried using hex values, ie \x2b which also doesn't work.
Anyone had similar problems? Any help would be much appreciated.
Thanks.
Adrian.
aliles@arrowuk.com