Mark D Smith wrote on 08 dec 2005 in comp.lang.javascript
:
i have to test a form for valid format of international numbers in the
format +44.1234567890
i realize that some countries have 3 numbers after the + but so far
apart from checking the number has numbers + and a . i have had no
luck checking for +NN. or +NNN.
Not very useful, since:
the one period is not the accepted standard
there are also 1 numbered [and 3 numbered] country codes
the 10 numbers after that are not absolute
result = /^\+\d{2}\.\d{10}$/.test('+44.1234567890')
a little better:
result = /^\+\d{1,3}\.\d{10}$/.test('+44.1234567890')
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)