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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^[D-d][K-k]( |-)[1-9]{1}[0-9]{3}$
Description
match all danish postal code update from last danish postal code expression
Matches
DK-1234 | dk 1234 | Dk-1234
Non-Matches
DK 12345
Author Rating: Not yet rated. paul Snabilie
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 regex
Name: Flemming
Date: 10/15/2008 12:11:24 PM
Comment:
This regex is wrong. Test: EK-4300, which shouldn't match, but it does. The problems are the dashes in the first part, e.g. [D-d] which matches all characters from D to d, i.e. E,F,G... Correct regex should be: ^[Dd][Kk]( |-)[1-9]{1}[0-9]{3}$


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