(00355) XX-XXX-XXXX
So far I have this but I don't know how to express that first five digits must be 00355.
/^.d{2}.\d{3}.\d{4}.$/
(00355) XX-XXX-XXXX
So far I have this but I don't know how to express that first five digits must be 00355.
/^.d{2}.\d{3}.\d{4}.$/
In case you want to give the user more flexibility:
http://www.phpliveregex.com/p/i9u
preg_match("/(00355\s\d{2}[-|\s]\d{3}[-|\s]\d{4})/", $input, $output);
Try this one:
#^\(00355\) \d{2}-\d{3}-\d{4}$#
https://regex101.com/r/d9ktJf/1
It will basicly check for string which starts with 00355 then has space then 2 numbers then -
then 3 numbers then - and end with 4 numbers #
is used as delimiter.