I need RegEx to check (using Laravel, php framework) for a swiss phone number that should match this format:
+41 11 111 11 11
The “+41” part should be exactly that way, while the rest (11 111 11 11) can be any number from 1 to 9.
The function that calls RegEx is as follows:
$regex = "thisIsWhereINeedYourHelp";
if (preg_match($regex, $value)) {
return true;
}
return true;
Thank you for your help!
source
share