Re: PHP 4.0 Bug #7222: ereg_replace, ereg

From: Date: Sun, 15 Oct 2000 23:12:14 +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-35075@lists.php.net to get a copy of this message
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 (#35075) next »