Red Gate forums :: View topic - UK postcode unit are restricted
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product support center
SQL Data Generator 1
SQL Data Generator 1 forum

UK postcode unit are restricted

Search in SQL Data Generator 1 forum
Post new topic   Reply to topic
Jump to:  
Author Message
icecurtain



Joined: 18 Jan 2010
Posts: 9

PostPosted: Tue Jan 29, 2013 11:20 am    Post subject: UK postcode unit are restricted Reply with quote

The final two letters, the UK postcode unit are restricted to the set ABDEFGHJLNPQRSTUWXYZ (which excludes the six letters CIKMOV)

The code on the download still has these in and is causing validation data issues has anyone a amended version?

Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<generators>
   <generator
      type="RedGate.SQLDataGenerator.ExpressionGenerators.RegexpGenerator"
      name="UK PostCode"
      description="CB4 1AS, AS1 9LJ, RD4 1LB, "
      category="Geographical">

      <property name="Expression">(AB|B|BA|BB|BD|BH|BL|BN|BR|BS|BT|CA|CB|CF|CH|CM|CO|CR|CT|CV|CW|DA|DE|DG|DH|DL|DN|DT|DY|E|EC|EH|EN|EX|FK|FY|G|GL|GU|H|HG|HP|HR|HS|HU|HX|IG|IM|IP|IV|KA|KT|KW|KY|L|LA|LD|LE|LL|LN|LS|LU|M|ME|MK|MK|N|NE|NG|NN|NP|NR|NW|OL|OX|PA|PE|PH|PL|PO|PR|RG|RH|RM|S|SA|SE|SG|SK|SL|SM|SN|SO|SP|SR|SS|ST|SW|SY|TA|TD|TF|TN|TQ|TR|TS|TW|UB|W|WA|WC|WD|WF|WN|WR|WS|WV|Y|ZE)([1-9]|[1-9][0-9]) [1-9][A-Z]{2}</property>

      <matches field=".*Post.*Code.*" score="50" minlen="8"/>
      <matches field=".*Addr.*4" score="12" minlen="8"/>

      <type type="string"/>
   </generator>
</generators>
Back to top
View user's profile Send private message
icecurtain



Joined: 18 Jan 2010
Posts: 9

PostPosted: Tue Jan 29, 2013 11:38 am    Post subject: Reply with quote

(AB|B|BA|BB|BD|BH|BL|BN|BR|BS|BT|CA|CB|CF|CH|CM|CO|CR|CT|CV|CW|DA|DE|DG|DH|DL|DN|DT|DY|E|EC|EH|EN|EX|FK|FY|G|GL|GU|H|HG|HP|HR|HS|HU|HX|IG|IM|IP|IV|KA|KT|KW|KY|L|LA|LD|LE|LL|LN|LS|LU|M|ME|MK|MK|N|NE|NG|NN|NP|NR|NW|OL|OX|PA|PE|PH|PL|PO|PR|RG|RH|RM|S|SA|SE|SG|SK|SL|SM|SN|SO|SP|SR|SS|ST|SW|SY|TA|TD|TF|TN|TQ|TR|TS|TW|UB|W|WA|WC|WD|WF|WN|WR|WS|WV|Y|ZE)([1-9]|[1-9][0-9]) [1-9](A|B|D|E|F|G|H|J|N|P|Q|R|S|T|U|V|W|X|Y|Z){2}
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6344
Location: Red Gate Software

PostPosted: Wed Jan 30, 2013 4:45 pm    Post subject: Reply with quote

Is your previous post the regular expression that works for you? If so, I can suggest future versions of Data Generator use your regular expression.
_________________
Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group