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
^(\+?)(\d{2,4})(\s?)(\-?)((\(0\))?)(\s?)(\d{2})(\s?)(\-?)(\d{3})(\s?)(\-?)(\d{2})(\s?)(\-?)(\d{2})
Description
This regex will match various ways of entering a Swiss phone number along with the country code.
Matches
+41 44 123 12 34 | +41 (0) 44 123 12 34 | +41-44-123-1234 | 0041 44 123 12 34
Non-Matches
+41 0 44 123 1234 | +41.44.123.1234
Author Rating: Not yet rated. Eric Wilson
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

Title: Swiss _Mobile_ Phone Regex
Name: Rockclimber
Date: 6/9/2010 4:03:49 PM
Comment:
^(((\+41)(\s?)(\-?))|(0))(7)(\d{1})(\s?)(\-?)(\d{3})(\s?)(\-?)(\d{2})(\s?)(\-?)(\d{2}) Validates for swiss mobile numbers, making international format optional... Cheers & Thanx


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