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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^\({0,1}0(2|3|7|8)\){0,1}(\ |-){0,1}[0-9]{4}(\ |-){0,1}[0-9]{4}$
Description
Expression to parse Australian landline telephone numbers. Will only accept valid STD codes. Allows for brackets around the STD code and either spaces or dashes between number groups.
Matches
(02) 9323 1234 | 0293231234 | 02-9323-1234
Non-Matches
01 9323 1234 | 02 932 123 | 02/9323/1234
Author Rating: Not yet rated. Ben Vaughan
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: Incorrect and inefficient syntax.
Name: g1smd
Date: 8/5/2012 4:10:07 AM
Comment:
The \({0,1} simplifies to \)? here. The (2|3|7|8) simplifies to [2378] here. The \){0,1} simplifies to \)? here. The (\ |-){0,1} simplifies to [\s-]? here.


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