Try it out on these example inputs:

back to RegexSwap.

DE Postal Code

Regular expression:

^(D\-)?[0-9]{5}$

Categories:

Popularity:

You need to be logged in to cast votes on regexes.

Good
0
Bad
0

Author description and comments (2)

Topic by
kasper

2009-01-13
19:12

Description

Postal codes for Germany / German cities.

Comment by
erikjanb


A common way of writing postalcodes for Germany is with a preceeding "D-".

Comment by
kasper


Thanks for the comment Erik. The regex have been updated with this now, so the new expression is:
^(D\-)?[0-9]{5}$

You need to be logged in to participate

In order to post your own comments on this regex, you need to be logged in.

Username:

Log in by clicking the login link at the top of the screen