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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Australian postal code verification
Expression
(0[289][0-9]{2})|([1345689][0-9]{3})|(2[0-8][0-9]{2})|(290[0-9])|(291[0-4])|(7[0-4][0-9]{2})|(7[8-9][0-9]{2})
Description
Accurate Australian postal code verification. Australia has 4-digit numeric postal codes with the following state based specific ranges. ACT: 0200-0299 and 2600-2639. NSW: 1000-1999, 2000-2599 and 2640-2914. NT: 0900-0999 and 0800-0899. QLD: 9000-9999 and 4000-4999. SA: 5000-5999. TAS: 7800-7999 and 7000-7499. VIC: 8000-8999 and 3000-3999. WA: 6800-6999 and 6000-6799.
Matches
0200 | 7312 | 2415
Non-Matches
0300 | 7612 | 2915
Author Rating: The rating for this expression. Vassilis Petroulias
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: RE: not allow state letters
Name: Danny Beckett
Date: 12/15/2011 6:45:28 PM
Comment:
It doesn't allow letters. It does exactly what you're asking for already.


Title: not allow state letters
Name: M
Date: 11/30/2011 2:49:43 PM
Comment:
Hi - i was wondering how i would modify this to disallow any letters - i just want it to match if they have entered the correct 4 digits. Thanks!


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