Re: Perl compatible regexes
| From: | Andrei Zmievski | Date: | Thu, 01 Jun 2000 17:49:15 +0000 |
| Subject: | Re: Perl compatible regexes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-855@lists.php.net to get a copy of this message | ||
> Can anyone please tell me why this isn't working? According to the docs,
> \\1 should have what I caught in my first parenthesis, but it keeps
> complaining.
> $_value=preg_replace("/<!--\s<([^>]+)>\s-->/", $_format[\\1],
> $_value);
>
> Perhaps perl-compatible should read perl-syntactically similar? ;-)
It looks like you want to use /e modifier here.
-Andrei
* There is no knowledge that is not power. *