Regex for French telephone numbers

phone number regex
regex for 10 digit phone number
regular expression to extract phone numbers
regex tester
international phone number regex
regular expression for phone number with extension
french phone number validation
regex phone number with dashes

I'm trying to implement a Regex that allows me to check if a number is a valid French telephone number.

It must be like this:

0X XX XX XX XX

or:

+33 X XX XX XX XX

Here is what I implemented but it's wrong ...

/^(\+33\s[1-9]{8})|(0[1-9]\s{8})$/

You can use:

^
    (?:(?:\+|00)33|0)     # Dialing code
    \s*[1-9]              # First number (from 1 to 9)
    (?:[\s.-]*\d{2}){4}   # End of the phone number
$

See demo


It allows whitespaces or . or - as a separator, or no separator at all

French Phone Number, Regular Expression to The French telephone numbering plan is not only used for metropolitan France but also for the French overseas departments and some� RegEx - Validate French Phone Number . The French number has . Ten-digit closed numbering scheme. Denoted by five double-digit numbers 0x xx xx xx xx. Starting number is always 0. First two digits denote the state as follows:

Telephone numbers in France, Is French Phone Number validation function properties. Name, Value. Description: French Phone Number Validation. Regular Expression: ^0[1� French Phone Number (ThankSys) Comments. Post Posting Guidelines Formatting - Now. Top Regular Expressions. email validation Not Allowing Special Characters

var phoneExp = /^((\+)33|0|0033)[1-9](\d{2}){4}$/g;

It also takes into account the 0033 scenario.

French Phone Number, The above expression is very precise and it will check whether or not the French Department exists (first two digits),� EPP-style phone numbers use the format +CCC.NNNNNNNNNNxEEEE, where C is the 1–3 digit country code, N is up to 14 digits, and E is the (optional) extension. The leading plus sign and the dot following the country code are required. The literal “x” character is required only if an extension is provided.

Try this:

/^(\+33 |0)[1-9]( \d\d){4}$/

Is French Phone Number, Although the tilde character (~) can appear within a phone number to indicate the existence of an additional dial tone, it has been excluded from this regular� Url Validation Regex | Regular Expression - Taha Match or Validate phone number match whole word nginx test Extract String Between Two STRINGS Match html tag Blocking site with unblocked games Find Substring within a string that begins and ends with paranthesis Empty String Checks the length of number and not starts with 0

Phone Number, Sign in Sign up. French phone number regex. tel-regex.js. var regex = new RegExp(/^[+](\d{3})\)?(\d{3})(\d{5,6})$|^(\d{10,10})$/);. regex.test('0612345678') // true. French doesn't use some of the characters the regular expression is trying to match, and the regular expression is not generic enough if it wants to match all those characters that are used in languages like French. – kiamlaluno Dec 17 '09 at 14:39

Using regular expressions, Exception: Some "special services" use 3 or 4 digits with no area or trunk codes: e.g.; 112 and 100 (fire brigade and ambulance); 101 (police); 1307 (info in French)� This is the process of building a phone number scraping regex. First, we need to match an area code (3 digits), a trunk (3 digits), and an extension (4 digits): reg = re.compile("\d{3}\d{3}\d{4}")

4.3. Validate International Phone Numbers, Works with all standard phone numbers, including country and area codes for most international numbers. Anything from +65 800 123 4567 ext.405 to 02-201-1222 to 865.101.1000 and more should work. Just use those Regex scripts in your text editor's Find tool, and they should find all the links, emails, and phone numbers in your text.

French phone number regex � GitHub, An actual UK phone number will start with 0 or +44 (the latter being the UK country code), or possibly just 44, followed by nine or ten digits. A regex to capture that would look something like: A regex to capture that would look something like:

Comments
  • What about home phone numbers and cellphones beginning with 07?
  • ^(((\+33\s)|0)[1-9]\s([0-9][0-9]\s){4})$ may do the trick but it's quite complex and is just and modification from yours (obligation to put space between two digits), but 0033 isn't allowed?
  • @Larme it is, indeed
  • JavaScript example : '+33678787878'.match(/^(?:(?:\+|00)33|0)\s*[1-9](?:[\s.-]*\d{2}){4}$/gmi)
  • Compatible with JSON schema: ^((\\+|00)33|0) *[1-9]([ .-]*[0-9]{2}){4}$
  • why not ^(\+33|0|0033)[1-9]\d{8}$ controlling for 8 numbers instead of 4 times 2 numbers (\d{2}){4}? Also if there is no reason to capture, you can dump all but the first group of parens.
  • In addition, in JavaScript, if using new RegExp, to avoid SyntaxError: nothing to repeat, you'll have to double escape the "+" at the beginning. So the final regex would be ^(\\+33|0|0033)[1-9][0-9]{8}$.
  • Thanks for the credits. As the string is a full match (^$) I'm not sure that the capturing group is necessary. Also, +33 0 12 34 56 78 is not a valid number...
  • @ThomasAyoub Ah, my lack of knowledge of how phone numbers works is to blame for that. Will edit. And very true about the capture group, I just wanted to reflect OP's original intent. Will make a note of it.