What are the challenges you face when working across database platforms? Take the survey
Options

UK Telephone Numbers Generator

CraigOttleyCraigOttley Posts: 19
Hi! I was asked to generate some telephone numbers. Some of the numbers got picked and were dialled successfully!! So after doing some research I came across Ofcom's site which listed numbers which will never be used....

http://stakeholders.ofcom.org.uk/telecoms/numbering/guidance-tele-no/numbers-for-drama

I've now put these into a Custom Generator so i'll never have the same problem again :o

HTH
<generators>
	<generator type="RedGate.SQLDataGenerator.ExpressionGenerators.RegexpGenerator" name="Phone Number" description="020 7946 0000, 01632 960999..." category="Telephone Numbers">
		<property name="Expression">((0113|0114|0115|0116|0117|0118|0121|0131|0141|0151|0161)(4960\d{3})|02079460\d{3}|02890180\d{3}|02920180\d{3}|01632960\d{3}|01914980\d{3})</property>
		<matches field=".*Phone.*" score="100" minlen="11"/>
		<matches field=".*Tel.*" score="99" minlen="11"/>
		<type type="string"/>
	</generator>
	<generator type="RedGate.SQLDataGenerator.ExpressionGenerators.RegexpGenerator" name="Mobile" description="07700 900 000, 07700 900 999..." category="Telephone Numbers">
		<property name="Expression">07700900\d{3}</property>
		<matches field=".*Mobile.*" score="99" minlen="11"/>
		<type type="string"/>
	</generator>
	<generator type="RedGate.SQLDataGenerator.ExpressionGenerators.RegexpGenerator" name="Freephone" description="08081 570 000, 08081 570 999..." category="Telephone Numbers">
		<property name="Expression">08081570\d{3}</property>
		<matches field=".*Free.*" score="70" minlen="11"/>
		<matches field=".*Work.*" score="70" minlen="11"/>
		<type type="string"/>
	</generator>
	<generator type="RedGate.SQLDataGenerator.ExpressionGenerators.RegexpGenerator" name="Premium Rate Services" description="0909 8790 000, 0909 87990 999..." category="Telephone Numbers">
		<property name="Expression">09098790\d{3}</property>
		<matches field=".*Work.*" score="50" minlen="11"/>
		<type type="string"/>
	</generator>
	<generator type="RedGate.SQLDataGenerator.ExpressionGenerators.RegexpGenerator" name="UK Wide" description="03069 990 000, 03069 990 999..." category="Telephone Numbers">
		<property name="Expression">03069990\d{3}</property>
		<type type="string"/>
	</generator>
</generators>

Comments

Sign In or Register to comment.