Re: PHP 4.0 Bug #7222: ereg_replace, ereg

From: Date: Mon, 16 Oct 2000 09:11:32 +0000
Subject: Re: PHP 4.0 Bug #7222: ereg_replace, ereg
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-35106@lists.php.net to get a copy of this message
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 ? On Sun, 15 Oct 2000, Ignacio Vazquez-Abrams wrote: > On 15 Oct 2000 zibin@techunix.technion.ac.il wrote: > > > From: zibin@tx.technion.ac.il > > Operating system: unix > > PHP version: 4.0.2 > > PHP Bug Type: *Regular Expressions > > Bug description: ereg_replace, ereg > > > > everytime I have a regular expression which have ".*" or "[0-9]*" I > > get the following error: > > > > Warning: REG_BADRPT in /home/websites/www.gigcenter.com/DB.htmlToPHP3.php3 on line 236 > > > > For example: > > if ( eregi("onlyuser\[(.*?)\]",$inside, $regs) || > > > > if ( eregi("adduser\[(.*?)\]",$inside, $regs) ) { > > > > But this doesn't cause error: > > if ( eregi("authenticate=(.)",$inside, $regs) ) > > $authenticate = $regs[1]; > > > > if ( eregi("MUST Authenticate",$inside) ) > > > > > > thanks for your time. > > ".*?" is a bad construct. Do you mean "(.\*)?" (optional any char but nl > followed by literal asterisk) or just ".*" (zero or more of any char but > nl)? > > -- > Ignacio Vazquez-Abrams <ignacio@openservices.netq > > > >

« previous php.dev (#35106) next »