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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find German postal code verification (UPDATED)
Expression
((0[13-7]|1[1235789]|[257][0-9]|3[0-35-9]|4[0124-9]|6[013-79]|8[0124-9]|9[0-5789])[0-9]{3}|10([2-9][0-9]{2}|1([2-9][0-9]|11[5-9]))|14([01][0-9]{2}|715))
Description
Accurate German postal code verification. Germany has 5-digit numeric postal codes. The expression evaluates a postal code within state based specific ranges.
Matches
01125
Non-Matches
34125
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: Incorrect expression
Name: Dirkjan Bussink
Date: 3/18/2011 5:09:58 AM
Comment:
It also excludes any zipcode starting with a 3, 5 and 9. They are perfectly valid however and also used in Germany. Also see: http://en.wikipedia.org/wiki/List_of_postal_codes_in_Germany


Title: Big Misstakes
Name: Felix
Date: 2/9/2006 4:06:31 AM
Comment:
This regex validates a lot of unallowed postal codes, For example, postal codes do not start with 00, 05, 43 and 62. There are also a lot of misstakes in the description, Niedersachsen (NI) e.g. uses the postal code ranges 21202-21449 48442-48465 48478-48480 A detailed list of all valid ranges for every state is listed here: http://www.eurotender.de/Postleizahlennachlaender.pdf


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