1 2 Previous Next 20 Replies Latest reply: Mar 5, 2007 6:35 AM by 791266 RSS

    Phone number Regular expression Help


      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).


      Any help would be kindly appriciated.

        1 2 Previous Next