|
|
I was looking out for Regular Expressions for validating Phone Numbers of different countries. Here are some of them:
French Phone Number - (0( \d\d ))?\d\d \d\d(\d \d \d\d )\d\d
German Phone Number - ((\(0\d\d\) (\(0\d{3}\) )?\d )?\d\d \d\d \d\d\(0\d{4}\) \d \d\d-\d\d?)
Japanese Phone Number - (0\d{1,4}-\(0\d{1,4}\) ?)?\d{1,4}-\d{4}
P.R.C Phone Number - (\(\d{3}\)\d{3}-)?\d{8}
U.S Phone Number - ((\(\d{3}\) ?)(\d{3}-))?\d{3}-\d{4}
P.S: I did not create these regular expressions. If you are using ASP.NET and Visual Studio 2008/2010, you can easily get these expressions by dropping a RegularExpression Validator and browsing through the Regular Expression Editor ( Select the Validator > Properties > ValidationExpression)
If you are looking out for some more Regular Expressions, check out these two sites with plenty of resources on it Regular-Expression.info and RegularExpressionLibrary
'Like' us on our FaceBook page if you find this blog useful. Thanks!
Did you like this post?
|
|
|
||
|
|
|
|
Save on Delicious |
|
|
subscribe via rss |
|
subscribe via e-mail |
|
|
print this post |
|
follow me on twitter |





comments
1 Response to "Regular Expression for Phone Numbers"your blog its a great one in tell abour jquery plugin
i love your blog, so cleary on explanation...salom from bandung blogger Indonesia
By the way where do you come from...hehehe :D
Post a Comment