> Hi,
>
> This script:
>
> <?
> $line = "Use operator m// for matching strings";
> $pattern = "m//";
>
> if(preg_match("/$pattern/", $line, $match)) {
> print $match[0]."\n";
> }
> ?>
There is no bug here!
The final pattern is "/m///". When using // as delimeters, you must escape
them, so you would need to set
$pattern="m\/\/"
*or*
using other delimeter such as '~':
preg_match("~$pattern~",...)
Nuno
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php