I have come across a one similar to this SW15A 4PP, but only once and from
that link you gave in the last post I noticed there is another. But I must
admit these must be very, very rare. I guess it would make the coding
infinitely more difficult if these 2 other variations are added. Must give
credit to Bob, as he has quite quickly generated some code.
Point taken though...
Scott
"Jamie Collins" wrote in message
ups.com...
Bob Phillips wrote:
Couple of problem(ettes) with that code, so I played with it some
more
Bob, Sorry, I didn't know this was a programming question...
Scott, The rules are even more complex than you stated <g.
Considered setting a reference to Microsoft VBScript Regular
Expressions 5.5 and using a more capable regular expression (the one
from my original post was intended for use in a SQL Server/Jet CHECK
constraint, which support only simple pattern matching, and does not do
the job anyhow). As with all things standardised, the 'not invented
here' mentality should be resisted. Here's somewhere to start looking:
http://regexlib.com/Search.aspx?k=uk%20postcode
Jamie.
--