Re: PHP 4.0 Bug #7222 Updated: ereg_replace, ereg
| From: | Joey Smith | Date: | Tue, 17 Oct 2000 15:24:08 +0000 |
| Subject: | Re: PHP 4.0 Bug #7222 Updated: ereg_replace, ereg | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-35265@lists.php.net to get a copy of this message | ||
Obviously, as previously discussed, the ? is not doing what you think it
is.
On 16 Oct 2000, joey@php.net wrote the following to php-dev@lists.php.net :
> ID: 7222
> Updated by: joey
> Reported By: zibin@tx.technion.ac.il
> Status: Closed
> Bug Type: *Regular Expressions
> Assigned To:
> Comments:
>
> Actually, the problem is in the escaping of the [ and ].
>
> The first \ is being eaten by the PHP parser.
>
> What you really want is
>
> eregi("onlyuser\\\[(.*?)\\\]",$inside, $regs)