Re: PHP 4.0 Bug #7222: ereg_replace, ereg
| From: | Lars Torben Wilson | Date: | Mon, 16 Oct 2000 09:43:51 +0000 |
| Subject: | Re: PHP 4.0 Bug #7222: ereg_replace, ereg | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-35107@lists.php.net to get a copy of this message | ||
Zibin Yoav writes:
> I'm sorry about the '?'.
> It came from perl (when I don't want the * to be greedy).
> But even after I remove it, it still causes the error REG_BADRPT.
> What does this error mean ?
It means that the regex contains an invalid repetition operator (i.e.,
* or +).
On both PHP 4.0.2 and PHP 4.0.4-dev, I get no error when not using the '?'.
What does the following code do for you?
<?php
error_reporting(E_ALL);
$inside = "This is onlyuser[one] and onLyuser[two].<br>\n";
if (eregi("onlyuser\[(.*)\]", $inside, $regs)) {
var_dump($regs);
}
?>
--
+----------------------------------------------------------------+
|Torben Wilson <torben@php.net> Netmill iTech|
|http://www.coastnet.com/~torben http://www.netmill.fi|
|Ph: 1 250 383-9735 torben@netmill.fi|
+----------------------------------------------------------------+