The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Regular Expressions for UK Formats

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Tim Sneath

Posts: 395
Nickname: timsneath
Registered: Aug, 2003

Tim Sneath is a .NET developer for Microsoft in the UK.
Regular Expressions for UK Formats Posted: Apr 6, 2004 4:15 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Tim Sneath.
Original Post: Regular Expressions for UK Formats
Feed Title: Tim Sneath's Blog
Feed URL: /msdnerror.htm?aspxerrorpath=/tims/Rss.aspx
Feed Description: Random mumblings on Microsoft, .NET, and other topics.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Tim Sneath
Latest Posts From Tim Sneath's Blog

Advertisement

It's often hard to find good UK-aware regular expressions (for use with the ASP.NET RegularExpressionValidator or the .NET RegEx class). I was therefore delighted to come across RegExLib.com, which contains a most comprehensive listing of commonly used regular expressions. I wish more US sites would take this into account too - not everyone has a telephone number of the form (xxx) xxx-xxxx!

Some of the most useful ones:

One big gap is for UK telephone numbers - as with other European countries such as Germany, the number format can vary depending on the area code. There are several expressions listed at RegExLib, but none of them properly match the Ofcom recommended presentation style. Has anyone found a better regular expression that they'd like to share?

Also interesting to see a regular expression blog - worth tracking if you deal with these issues on a regular basis. Thanks to the mswebdev mailing list (run by Phil and Chris) for this pointer.

Read: Regular Expressions for UK Formats

Topic: Back To Google 2.0 Toolbar Previous Topic   Next Topic Topic: Every time I think I'm out, they pull me back in...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use