Australian Phone Number
beginnerMatches Australian phone numbers in common formats.
phoneaustraliavalidation
Pattern
/(?:\+61[\s-]?|0)[2-478](?:[\s-]?\d){8}/gTry It
0 of 6 strings matched
Explanation
Matches Australian phone numbers starting with +61 or 0, followed by a valid area code digit (2, 3, 4, 7, or 8) and 8 more digits with optional separators.
Test Strings
Matching
- +61 2 1234 5678
- 02 1234 5678
- +61-412-345-678
Non-matching
- +1-555-1234
- 01 1234 5678
- 12345
Language Compatibility
| Language | Support |
|---|---|
| JS | Full support |
| PYTHON | Full support |
| JAVA | Full support |
| PHP | Full support |
| GO | Full support |
Code Snippets
const regex = /(?:\+61[\s-]?|0)[2-478](?:[\s-]?\d){8}/g;
const text = "your text here";
const matches = text.match(regex);
console.log(matches);