i am trying to create a regex to match phone numbers starting with +254
examples of phone numbers +254716370730
+254856798768
+254765432135
i have tried
preg_match('/^\\+254\\d{9}/,$phonenumber');
but doesn't seem to work, any assistance will be highly appreciated
The correct syntax should be:
preg_match('/^\+254\d{9}/', $phonenumber);