Tutorials Forums
     Tutorials Videos
        Sign Up Now For FREE
Welcome, Guest
Username Password: Remember me

Australian International Telephone Number Validati
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Australian International Telephone Number Validati

Australian International Telephone Number Validati 12 Dec 2009 04:28 #110

Instructions: Australian International format:
+61x xxxx-xxxx

The first x being the area code and the rest of the x's is the phone number.

The [2-9] is so we only require just one digit between two and nine inclusively.

The [:space:]] class ensures a space is used.

The last part, [0-9]{4}-[0-9]{4}$ tells the Regex engine that the number must have a group of four digits then a hyphen with another set of four digits ending with an end of string character.
^\+61[2-9][[:space:]][0-9]{4}-[0-9]{4}$
  • CE
  • OFFLINE
  • Administrator
  • Posts: 197
  • Karma: 78
CodersEngine
  • Page:
  • 1
Moderators: mnjon
Time to create page: 0.30 seconds