[thelist] Validating Irish Phone Numbers

Drew Shiel ashiel at sportsinteraction.com
Fri Dec 10 03:30:59 CST 2004

Hi James;

Drop me a line at this address or at gothwalk at gmail dot com and let me 
know what details you need.

Drew, in Dublin.

At 17:19 08/12/2004, James Hardy wrote:

>Hi All,
>I run a site where people registering must give their telephone numbers. 
>Currently the site is open to customers from the UK and Éire.
>Naturally we want some validation of the numbers. For the British numbers 
>this is no problem as we are familiar with the format and have written a 
>set of regular expressions to handle it (see tip). However we don't really 
>have any clear idea of the format of Irish numbers. If there are any 
>Irishmen (or women) on the list, or anyone who just happens to know, could 
>they please help
><tip type="Validating UK Phone Numbers" author="James Hardy">
>Once stripped of all formating, most British phone numbers can be 
>validated with a set of simple regular expressions.
>    //landline numbers are 11 digits (sometimes 10) and begin 01 or 02
>    var ltelf = /0[1-2][0-9]{8,9}/;
>    //mobile and pager numbers are always 11 digits long and begin 07
>    var mtelf = /07[0-9]{9}/;
>    //to test for either landline or mobile
>    var xtelf = /0[1-2,7]{9,10}/;
>Special rate numbers beginning 08 and 09 do not follow this format
>Numbers beginning 05 are "Business" numbers and have been mainly adopted 
>as numbers for VOIP though they are very rare and can probably be ignored. 
>(would be /05[0-9]{9}/ though)
>Numbers beginning 03, 04 and 06 are not yet used
>* * Please support the community that supports you.  * *
>For unsubscribe and other options, including the Tip Harvester and 
>archives of thelist go to: http://lists.evolt.org Workers of the Web, evolt !
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.806 / Virus Database: 548 - Release Date: 05/12/2004
-------------- next part --------------

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.806 / Virus Database: 548 - Release Date: 05/12/2004

More information about the thelist mailing list