ASP.NET - Regular expression for UK Phone and Mobile

Asked By Jem Savery on 16-Jul-11 03:07 PM
Hi Friends, 

Can anybody give me the proper Regular expression validator for UK Phone and mobile. Here are the basic conditions.

The client deems numbers to be valid if they are classed as either:
- Mobile Numbers or
- Valid UK Format

Mobile Numbers shall be classed as:
- Commencing 07
- Being 11 digits long
- Containing only numeric characters

Valid UK format rules shall be classed as the description found on

Any help is appreciated.

Thanks in advance,

dipa ahuja replied to Jem Savery on 16-Jul-11 03:33 PM
Try this:

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
ErrorMessage="invalid pincode"/>

and to search more ragular expression check this :
Devil Scorpio replied to Jem Savery on 16-Jul-11 03:55 PM
Hi Jem,

Assuming (07|447|\+447) are the codes for the UK, then this regex should be used


Mobile - 07856920000
Phone - 447700912345,+447700912345
Radhika roy replied to Jem Savery on 17-Jul-11 02:04 AM
I belive that UK number often have 5 digits before your '-' character.

Follow these regular expressions.


And here to capture the number groups:


And here is the expression cleaned up:

Hope this will help you.