Justtechjobs.com Find a programming school near you






Online Campus Both


php-developer-list | 2000101

Re: [PHP-DEV] PHP 4.0 Bug #7222: ereg_replace, ereg From: Ignacio Vazquez-Abrams (ignacio <email protected>)
Date: 10/15/00

On 15 Oct 2000 zibin <email protected> wrote:

> From: zibin <email protected>
> 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 <email protected>

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>