ich möchte mit Preg_match überprüfen ob die Telefonnummer in folgen
dem format sind:
+49-000-000000
Habe mit nem Prog folgendes geprüft:
^\+\d{2,3}-{1}\d{3,4}-{1}\d{5,}
das scheint so richtig zu sein. Zumindest klappte es in dem programm.
in php bekomme ich wenn ich das nutze:
folgenden fehler:
No ending delimiter '^' found in
dachte ich müßte am ende noch ein ^ stehen haben, dann kommt aber:
Compilation failed: nothing to repeat at offset 0
dem format sind:
+49-000-000000
Habe mit nem Prog folgendes geprüft:
^\+\d{2,3}-{1}\d{3,4}-{1}\d{5,}
das scheint so richtig zu sein. Zumindest klappte es in dem programm.
in php bekomme ich wenn ich das nutze:
PHP:
preg_match('^\+\d{2,3}-{1}\d{3,4}-{1}\d{5,}',$phone)
folgenden fehler:
No ending delimiter '^' found in
dachte ich müßte am ende noch ein ^ stehen haben, dann kommt aber:
Compilation failed: nothing to repeat at offset 0