Posted by Jψrn Dahl-Stamnes on 11/19/39 11:58
I try to use preg_match to find out if a string begins with either "http",
"/somethime" or "../something". In my php script I have the following line:
if (0 == preg_match("/^(http.+)|(\/[a-z].+/)|(\.\.[a-z]+)/i",$string)
But I get a:
Warning: Unknown modifier ')' in myscript.php at line nn
What's wrong with the pattern?
--
JΓΈrn Dahl-Stamnes
http://www.dahl-stamnes.net/dahls/
Navigation:
[Reply to this message]
|