473,385 Members | 1,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Reg expression uk postcode

Hi All,

I am new to regular expressions and was wandering if anyone out there
could help me with building the expression needed to validate a UK
postcode?

Any help is much appreciated,

Thanks

Simon

Apr 20 '07 #1
2 3833
Read the UK Postcode validation section at wikipedi - it ahs the reg
expressions there for it

http://en.wikipedia.org/wiki/UK_postcodes#Validation

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog

"si_owen" <s.****@sstaffs.gov.ukwrote in message
news:11*********************@o5g2000hsb.googlegrou ps.com...
Hi All,

I am new to regular expressions and was wandering if anyone out there
could help me with building the expression needed to validate a UK
postcode?

Any help is much appreciated,

Thanks

Simon

Apr 20 '07 #2
On 20 Apr, 17:08, "John Timney \(MVP\)" <x_j...@timney.eclipse.co.uk>
wrote:
Read the UK Postcode validation section at wikipedi - it ahs the reg
expressions there for it

http://en.wikipedia.org/wiki/UK_postcodes#Validation

Regards

John Timney (MVP)http://www.johntimney.comhttp://www.johntimney.com/blog

"si_owen" <s.o...@sstaffs.gov.ukwrote in message

news:11*********************@o5g2000hsb.googlegrou ps.com...
Hi All,
I am new to regular expressions and was wandering if anyone out there
could help me with building the expression needed to validate a UK
postcode?
Any help is much appreciated,
Thanks
Simon- Hide quoted text -

- Show quoted text -
Thanks

Thats worked a treat.

Apr 23 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: AJ | last post by:
Hi All Just a quickie. A form element for a search will contain either a town or a post code. Is there any way we can check the input to see if the element contains a number (in which case it...
5
by: Lapchien | last post by:
I have a field for a postcode. I'd like another field to auto contain an 'area' number, based on the first part (only) of the postcode. For example, if a postcode LS4 4DJ was entered, another...
5
by: Dave | last post by:
Using Access 2000, I'm looking for a way to concatenate two fields in an expression within a report. Basically, the two are an address field (memo type) and postcode (text). I know about the...
0
by: Edward | last post by:
I have the following control on my page: <asp:regularexpressionvalidator id="RegularExpressionValidator1" style="Z-INDEX: 104; LEFT: 355px; POSITION: absolute; TOP: 28px" runat="server"...
6
by: Julian | last post by:
Hi, I am a very beginner in databases. I created a database table in Access 2003 and OOo 2.03 that includes name, address, postcode, phone numbers etc of our customers. I would like to sort...
3
by: mark | last post by:
I have a table of UK companies whose records I want to filter using a map of postcode regions. For the benfit of people outside the UK, our postcodes are a pain to work with because they are not...
12
by: xhe | last post by:
I am now developing a website which needs Canadian PostCode Database. I can certainly buy one, but that will cost my hundered of $$, and my website is only for education purpose, it won't make...
5
by: billynastie2007 | last post by:
Hi i am writing a balloon race site and i am having problems with some functions to calculate the distance the balloon travels firstly i am reading my info from the database using the fetch assoc...
0
by: Pinna | last post by:
Hiya, I am trying to select based on a range on postcode on a table. The field POSTCODE is a varchar2(8). The problem is when refinng on 'where postcode between 'PE1' and 'PE29'', because this is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.