Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript regex french phone number

function regexPhoneNumber(str) {
	const regexPhoneNumber = /^((+)33|0)[1-9](d{2}){4}$/; 
  
	if (str.match(regexPhoneNumber)) {
		return true;
	} else {
		return false;
	}
}

let phoneNumber = "+33777777777";
console.log(regexPhoneNumber(phoneNumber));
 
PREVIOUS NEXT
Tagged: #javascript #regex #french #phone #number
ADD COMMENT
Topic
Name
9+4 =