Link to home
Start Free TrialLog in
Avatar of Alyanto
AlyantoFlag for United Kingdom of Great Britain and Northern Ireland

asked on

.net regex

I am looking for a site with a good set of regexes preferably .net specific that would allow me to validate formats such as postal code in the EU, or US+ Other American nations.

Also would like things on the site such as time formats, number formats, or numeric rounding rules.
Avatar of Dennis Aries
Dennis Aries
Flag of Netherlands image

I'm not aware of such a site, but it is easy to create your own set to check against.

Browse to for the various formats used in the world. These are easily converted to simple regex-statements that can help you with a basic validation. For an extended validation you will have to perform a lot more research since not all combinations are used in each country. For instance, for the netherlands '0000 ZZ' would be valid according to the specifications but there is no physical address connected to that code.

For time, number and other formats, you might want to take a look at CultureInfo.DateTimeFormat that can tell you the valid patterns for a specific culture.
Avatar of Alyanto


Unfortunatly Dennis I am looking for a little more.  I currently have this reference material  I really looking for some to say I have done this exercise of getting together common usage regex and have them share it if possible.  I can see you are thinking in the right direction and I would hope you might profit from this information too.
Avatar of it_saige
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alyanto


Excellent, not much else I can say.