RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Complex Australian Phone Number
Expression
^\({0,1}((0|\+61)(2|4|3|7|8)){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3}$
Description
Australian phone number validator. Accepts all forms of Australian phone numbers in different formats (area code in brackets, no area code, spaces between 2-3 and 6-7th digits, +61 international dialing code). Checks that area codes are valid (when entered).
Matches
0403111111 | (03) 1111 1111 | +61403111111 | 02 9111 1111 | 0403 111 111 | 91111111
Non-Matches
9111 11111 | 99 1111 1111
Author Rating: The rating for this expression. A.T.Groom
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Thank you!
Name: Eric S.
Date: 11/23/2023 6:39:32 AM
Comment:
8 years on, but the final version (8/17/2015 7:14:17 PM) is the best I've found to cover all the options I needed to support. Appreciate your fine work!!!


Title: Tweaked to add more matches
Name: Michael Y
Date: 8/17/2015 7:14:17 PM
Comment:
I have it matching for: 91111111, 9111 1111, 9111-1111, 02-9111-1111, 02 9111 1111, +61291111111, +61400000000, +61 2 9111 1111, +61-2-9111-1111, +61-02-9111-1111, +61 02 9111 1111, 1800 111 111, 1800-111-111, 1800111111, 1300000000, 1300 000 000, 1300-000-000, 13 11 11, 13-11-11, 131 111, 131-111, 13 1111, 0411111111, 04 11 111 111, 0411 111 111, 0411-111-111, (02)91111111, (02)9111-1111, (02) 91111111, (02) 9111 1111, (02) 9111-1111, (02)-9111-1111 (^1(3|8)[0-9]{2}(\ |-){0,1}[0-9]{3}(\ |-){0,1}[0-9]{3})|(^\({0,1}(0|\+61){0,1}(\ |-){0,1}0{0,1}(2|4|3|7|8){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3})|(^13((\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}))|(^13[0-9](\ |-){0,1}[0-9]{3})


Title: Tweaked to add more matches
Name: Michael Y
Date: 8/17/2015 7:14:08 PM
Comment:
I have it matching for: 91111111, 9111 1111, 9111-1111, 02-9111-1111, 02 9111 1111, +61291111111, +61400000000, +61 2 9111 1111, +61-2-9111-1111, +61-02-9111-1111, +61 02 9111 1111, 1800 111 111, 1800-111-111, 1800111111, 1300000000, 1300 000 000, 1300-000-000, 13 11 11, 13-11-11, 131 111, 131-111, 13 1111, 0411111111, 04 11 111 111, 0411 111 111, 0411-111-111, (02)91111111, (02)9111-1111, (02) 91111111, (02) 9111 1111, (02) 9111-1111, (02)-9111-1111 (^1(3|8)[0-9]{2}(\ |-){0,1}[0-9]{3}(\ |-){0,1}[0-9]{3})|(^\({0,1}(0|\+61){0,1}(\ |-){0,1}0{0,1}(2|4|3|7|8){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3})|(^13((\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}))|(^13[0-9](\ |-){0,1}[0-9]{3})


Title: Tweaked to add more matches
Name: Michael Y
Date: 8/17/2015 2:54:24 AM
Comment:
I have it matching for: 91111111, 9111 1111, 9111-1111, 02-9111-1111, 02 9111 1111, +61291111111, +61400000000, +61 2 9111 1111, +61-2-9111-1111, +61-02-9111-1111, +61 02 9111 1111, 1800 111 111, 1800-111-111, 1800111111, 1300000000, 1300 000 000, 1300-000-000, 13 11 11, 13-11-11, 131 111, 131-111, 13 1111, 0411111111, 04 11 111 111, 0411 111 111, 0411-111-111, (02)91111111, (02)9111-1111, (02) 91111111, (02) 9111 1111, (02) 9111-1111, (02)-9111-1111 (^1(3|8)[0-9]{2}(\ |-){0,1}[0-9]{3}(\ |-){0,1}[0-9]{3})|(^\({0,1}(0|\+61){0,1}(\ |-){0,1}0{0,1}(2|4|3|7|8){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3})|(^13((\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}))|(^13[0-9](\ |-){0,1}[0-9]{3})


Title: Tweaked to add more matches
Name: Michael Y
Date: 8/17/2015 2:35:37 AM
Comment:
I have it matching for: 91111111, 9111 1111, 9111-1111, 02-9111-1111, 02 9111 1111, +61291111111, +61400000000, +61 2 9111 1111, +61-2-9111-1111, +61-02-9111-1111, +61 02 9111 1111, 1800 111 111, 1800-111-111, 1800111111, 1300000000, 1300 000 000, 1300-000-000, 13 11 11, 13-11-11, 131 111, 131-111, 13 1111, 0411111111, 04 11 111 111, 0411 111 111, 0411-111-111, (02)91111111, (02)9111-1111, (02) 91111111, (02) 9111 1111, (02) 9111-1111, (02)-9111-1111 (^1(3|8)[0-9]{2}(\ |-){0,1}[0-9]{3}(\ |-){0,1}[0-9]{3})|(^\({0,1}(0|\+61){0,1}(\ |-){0,1}0{0,1}(2|4|3|7|8){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3})|(^13((\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}))|(^13[0-9](\ |-){0,1}[0-9]{3})


Title: Tweaked to add more matches
Name: Michael Y
Date: 8/17/2015 2:23:46 AM
Comment:
I have it matching for: 91111111, 9111 1111, 9111-1111, 02-9111-1111, 02 9111 1111, +61291111111, +61400000000, +61 2 9111 1111, +61-2-9111-1111, +61-02-9111-1111, +61 02 9111 1111, 1800 111 111, 1800-111-111, 1800111111, 1300000000, 1300 000 000, 1300-000-000, 13 11 11, 13-11-11, 131 111, 131-111, 13 1111, 0411111111, 04 11 111 111, 0411 111 111, 0411-111-111, (02)91111111, (02)9111-1111, (02) 91111111, (02) 9111 1111, (02) 9111-1111, (02)-9111-1111 (^1(3|8)[0-9]{2}(\ |-){0,1}[0-9]{3}(\ |-){0,1}[0-9]{3})|(^\({0,1}(0|\+61){0,1}(\ |-){0,1}0{0,1}(2|4|3|7|8){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3})|(^13((\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}))|(^13[0-9](\ |-){0,1}[0-9]{3})


Title: Tweaked to add more matches
Name: Michael Y
Date: 8/17/2015 2:23:37 AM
Comment:
I have it matching for: 91111111, 9111 1111, 9111-1111, 02-9111-1111, 02 9111 1111, +61291111111, +61400000000, +61 2 9111 1111, +61-2-9111-1111, +61-02-9111-1111, +61 02 9111 1111, 1800 111 111, 1800-111-111, 1800111111, 1300000000, 1300 000 000, 1300-000-000, 13 11 11, 13-11-11, 131 111, 131-111, 13 1111, 0411111111, 04 11 111 111, 0411 111 111, 0411-111-111, (02)91111111, (02)9111-1111, (02) 91111111, (02) 9111 1111, (02) 9111-1111, (02)-9111-1111 (^1(3|8)[0-9]{2}(\ |-){0,1}[0-9]{3}(\ |-){0,1}[0-9]{3})|(^\({0,1}(0|\+61){0,1}(\ |-){0,1}0{0,1}(2|4|3|7|8){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3})|(^13((\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}))|(^13[0-9](\ |-){0,1}[0-9]{3})


Title: Tweaked to add more matches
Name: Michael Y
Date: 8/17/2015 2:23:26 AM
Comment:
I have it matching for: 91111111, 9111 1111, 9111-1111, 02-9111-1111, 02 9111 1111, +61291111111, +61400000000, +61 2 9111 1111, +61-2-9111-1111, +61-02-9111-1111, +61 02 9111 1111, 1800 111 111, 1800-111-111, 1800111111, 1300000000, 1300 000 000, 1300-000-000, 13 11 11, 13-11-11, 131 111, 131-111, 13 1111, 0411111111, 04 11 111 111, 0411 111 111, 0411-111-111, (02)91111111, (02)9111-1111, (02) 91111111, (02) 9111 1111, (02) 9111-1111, (02)-9111-1111 (^1(3|8)[0-9]{2}(\ |-){0,1}[0-9]{3}(\ |-){0,1}[0-9]{3})|(^\({0,1}(0|\+61){0,1}(\ |-){0,1}0{0,1}(2|4|3|7|8){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3})|(^13((\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}))|(^13[0-9](\ |-){0,1}[0-9]{3})


Title: Tweaked to add more matches
Name: Michael Y
Date: 8/17/2015 2:22:14 AM
Comment:
I have it matching for: 91111111, 9111 1111, 9111-1111, 02-9111-1111, 02 9111 1111, +61291111111, +61400000000, +61 2 9111 1111, +61-2-9111-1111, +61-02-9111-1111, +61 02 9111 1111, 1800 111 111, 1800-111-111, 1800111111, 1300000000, 1300 000 000, 1300-000-000, 13 11 11, 13-11-11, 131 111, 131-111, 13 1111, 0411111111, 04 11 111 111, 0411 111 111, 0411-111-111, (02)91111111, (02)9111-1111, (02) 91111111, (02) 9111 1111, (02) 9111-1111, (02)-9111-1111 (^1(3|8)[0-9]{2}(\ |-){0,1}[0-9]{3}(\ |-){0,1}[0-9]{3})|(^\({0,1}(0|\+61){0,1}(\ |-){0,1}0{0,1}(2|4|3|7|8){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3})|(^13((\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}))|(^13[0-9](\ |-){0,1}[0-9]{3})


Title: Tweaked to add more matches
Name: Michael Y
Date: 8/17/2015 2:21:56 AM
Comment:
I have it matching for: 91111111, 9111 1111, 9111-1111, 02-9111-1111, 02 9111 1111, +61291111111, +61400000000, +61 2 9111 1111, +61-2-9111-1111, +61-02-9111-1111, +61 02 9111 1111, 1800 111 111, 1800-111-111, 1800111111, 1300000000, 1300 000 000, 1300-000-000, 13 11 11, 13-11-11, 131 111, 131-111, 13 1111, 0411111111, 04 11 111 111, 0411 111 111, 0411-111-111, (02)91111111, (02)9111-1111, (02) 91111111, (02) 9111 1111, (02) 9111-1111, (02)-9111-1111 (^1(3|8)[0-9]{2}(\ |-){0,1}[0-9]{3}(\ |-){0,1}[0-9]{3})|(^\({0,1}(0|\+61){0,1}(\ |-){0,1}0{0,1}(2|4|3|7|8){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3})|(^13((\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}))|(^13[0-9](\ |-){0,1}[0-9]{3})


Title: Correction for Australian Phone System for 6 Digit Numbers (13 xxxx)
Name: Craig
Date: 3/22/2015 8:41:00 PM
Comment:
Handles 13 xxxx, 13xx xxx xxx and 18xx xxx xxx as well as all mobile and local numbers (I hope.) (^\({0,1}((0|\+61)(2|4|3|7|8)){0,1}\){0,1}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{3}$)|(^13((\ |-){0,1}[0-9]{2}(\ |-){0,1}[0-9]{2})$)|(^1(3|8)[0-9]{2}(\ |-){0,1}[0-9]{3}(\ |-){0,1}[0-9]{3})$


Title: Alternate
Name: Nico
Date: 2/4/2014 9:06:19 PM
Comment:
"^(0\d{3})|(\(0\d\) ?\d{2})|(\+\d{2} ?\d ?\d{2})|(\+\d{2} ?\(\d\) ?\d{2}) ?\d{3} ?\d{3}"


Title: Alternate
Name: Nico
Date: 2/4/2014 9:06:10 PM
Comment:
"^(0\d{3})|(\(0\d\) ?\d{2})|(\+\d{2} ?\d ?\d{2})|(\+\d{2} ?\(\d\) ?\d{2}) ?\d{3} ?\d{3}"


Title: 1300 Numbers
Name: Ian
Date: 5/31/2012 1:21:34 AM
Comment:
Doesn't seem to work for numbers of format 1300XXXXXX or format 13XXXX


Title: Ignore that comment
Name: Peter
Date: 12/5/2011 12:51:19 AM
Comment:
Actually, seems like PEBCAC from me.


Title: Good, but doesn't support +61 Mobile Number
Name: Peter
Date: 12/5/2011 12:49:39 AM
Comment:
Some users may wish to enter their mobile phone number with +61, for example: +61412345678, which this script doesn't seem to support.


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials