Need a regular expression for an Irish phone number
Posted
by Eoghan O'Brien
on Stack Overflow
See other posts from Stack Overflow
or by Eoghan O'Brien
Published on 2010-06-02T11:58:05Z
Indexed on
2010/06/02
12:13 UTC
Read the original article
Hit count: 270
I need to validate an Irish phone number but I don't want to make it too user unfriendly, many people are used to writing there phone number with brackets wrapping their area code followed by 5 to 7 digits for their number, some add spaces between the area code or mobile operator.
The format of Irish landline numbers is an area code of between 1 and 4 digits and a number of between 5 to 8 digits.
e.g.
(021) 9876543
(01)9876543
01 9876543
(0402)39385
I'm looking for a regular expression for Javascript/PHP.
Thanks.
© Stack Overflow or respective owner