Advertisement

06.03.2008 at 02:03PM PDT, ID: 23454711
[x]
Attachment Details

Extracting a UK Postcode into its seperate parts

Asked by Duanvdw in .NET, Microsoft Visual Basic.Net, Regular Expressions

Tags: VB.Net

Hi All

I am having some problem with building an application on .NET which needs to take an input from a user in the form of a UK postcode,and then split it up into the different parts that make up a postcode.

The format of UK postcode is generally:

    A9 9AA
    A99 9AA
    A9A 9AA
    AA9 9AA
    AA99 9AA
    AA9A 9AA

Explanation at http://en.wikipedia.org/wiki/UK_postcodes

This split up into Area, District, Sector and Unit. For example YO31 1EB is:

YO  -  Area
31  -  District
1  -  Sector
EB  -  Unit

I need to store these parts separately in the database once extracted.

Any help would be appreciated.

Thanks
DStart Free Trial
 
Loading Advertisement...
 
[+][-]06.03.2008 at 11:14PM PDT, ID: 21707330

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 12:23AM PDT, ID: 21707631

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, Microsoft Visual Basic.Net, Regular Expressions
Tags: VB.Net
Sign Up Now!
Solution Provided By: Rimvis
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.04.2008 at 10:48AM PDT, ID: 21712336

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628