Phone number Regular expression Help
807599Mar 5 2007 — edited Mar 5 2007Hi,
I am trying to validate phone number using regular expression.
The format shoud be either of the two given below. It should not
accept phone number of any other format other than the once given below.
I tried out the following regular expression
pn.matches("[\p{+}][0-9]+ ")
but it accepts alphabets too(which is wrong).
How do i check if the phone number is of the following format(OR condition).
0401234567
+358501234567
Any help would be kindly appriciated.
Thanks
Sanam