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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Australian mobile phone number
Expression
^((61|\+61)?\s?)04[0-9]{2}\s?([0-9]{3}\s?[0-9]{3}|[0-9]{2}\s?[0-9]{2}\s?[0-9]{2})$
Description
Validates an Australian mobile telephone number that can include an international prefix and four plus (two or three-digit) grouping. I use it in ASP.NET MVC DataAnnotations [RegularExpression()] attributes where I don't get to easily strip out spaces beforehand.
Matches
0418123456 | 0411 123 456 | 0414 12 34 56 | 61 0401 123 456 | +61 0418 12 34 56
Non-Matches
0418 1 23 45 6 | 04 01 123456 | +62 0418 12 34 56
Author Rating: Not yet rated. Steve Malikoff
   Displaying page 1 of 1 pages; Items 1 to 1

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