RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find swiss phone number
Expression
^(((((\+)?(\s)?(\d{2,4}))(\s)?((\(0\))?)(\s)?|0)(\s|\-)?)(\s|\d{2})(\s|\-)?)?(\d{3})(\s|\-)?(\d{2})(\s|\-)?(\d{2})
Description
This regex matchs nearly all forms off swiss phone numbers, not only the official form.
Matches
0521112233, 052 111 22 33, +41 (0)52 111 22 33, +41 52 111 22 33, 0041 52 111 22 33
Non-Matches
0041 052 111 22 33, +41 11 22 33 44
Author Rating: The rating for this expression. Manuela Grob
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials