Posted By

devision on 10/26/09


regex phone

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Valid phone number

 / Published in: Regular Expression

Accepts: * 123456789 * 123123456789 * 123 123456789

  1. ^(\+?)([0-9]+?)(\s?)(\+?)[0-9]+$

Report this snippet  


RSS Icon Subscribe to comments
Posted By: gms8994 on December 4, 2009

This doesn't actually validate that it's a phone number, past the fact that it contains only numbers, plusses, and spaces. See this example for a more in-depth validation.

You need to login to post a comment.