Try it out on these example inputs:

back to RegexSwap.

Danish postal code

Regular expression:

^(DK(-| )?)?[0-9]{4}$

Categories:

Popularity:

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

Good
1
Bad
0

Author description and comments (0)

Topic by
kasper

2009-01-05
22:11

Description

This regex allows three different formats of danish postal codes. Examplified with the 2200 postal code:
  • DK-2200
  • DK2200
  • 2200

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