Posted by Andrew Richardson on 03/07/06 00:56
Apologies if this has been asked before - I can't find anything on Google or
Google Groups.
I am running PHP 5.0.4 on Apache 2.0.54 with the PCRE extension installed.
For some reason though, the preg_match function is recognised by PHP but it
won't seem to accept any regexes as arguments.
For example:
$result = preg_match("[0-9][0-9]","12")
gives me an error of: Unknown modifier '['
and
$result = preg_match("hello","hello")
gives me an error of: Delimiter must not be alphanumeric or backslash
Am I doing something wrong here?
Thanks in advance
Andrew Richardson
[Back to original message]
|