/ Published in: Regular Expression
Accepts: * 123456789 * 123123456789 * 123 123456789
Expand |
Embed | Plain Text
^(\+?)([0-9]+?)(\s?)(\+?)[0-9]+$
Comments
Subscribe to comments
You need to login to post a comment.
devision on 10/26/09
2 people have marked this snippet as a favorite
Accepts: * 123456789 * 123123456789 * 123 123456789
^(\+?)([0-9]+?)(\s?)(\+?)[0-9]+$
Subscribe to comments
You need to login to post a comment.
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.