Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Regex question
Message
From
20/04/2010 11:35:02
 
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01460501
Message ID:
01461124
Views:
38
>I'd like to see that !

If you mean the pattern for the vat numbers, here it is

Formats are CC NNNNN
Where CC = country code
NNNNN = the number

There's a space between CC and NNNNN

I did not do it entrirely by hand
I have a table with the possibilities per country. A program then assembles all the pieces together
^((BE (([01]\d{9})))|(   (([01]\d{9})))|(NB)|(AT ((U\d{8})))|(BG ((\d{9,10})))|(CY ((\d{8}[A-Z])))|(CZ ((\d{8,10})))|(DE ((\d{9})))|(DK ((\d{8})))|(EE ((\d{9})))|(EL ((\d{9})))|(ES (([A-Z]\d{8})|(\d{8}[A-Z])|([A-Z]\d{7}[A-Z])))|(EU ((\d{9})))|(FI ((\d{8})))|(FR ((\d{11})|([A-HJ-NP-Z]\d{10})|(\d[A-HJ-NP-Z]\d{9})|([A-HJ-NP-Z]{2}\d{9})))|(GB ((\d{9,10})|(\d{12,13})|(GD\d{3})|(HA\d{3})))|(HU ((\d{8})))|(IE ((\d{7}[A-W])|([7-9][A-Z\*\+]\d{5}[A-W])))|(IT ((\d{11})))|(LT ((\d{9}|\d{12})))|(LU ((\d{8})))|(LV ((\d{11})))|(MT ((\d{8})))|(NL ((\d{9}B\d{2})))|(PL ((\d{10})))|(PT ((\d{9})))|(RO ((\d{2,10})))|(SE ((\d{12})))|(SI ((\d{8})))|(SK ((\d{9,10}))))$
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform