Bug #13439 Updated: unbound .* patterns don't work properly

From: Date: Sun, 02 Jun 2002 17:58:50 +0000
Subject: Bug #13439 Updated: unbound .* patterns don't work properly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-9192@lists.php.net to get a copy of this message
ID: 13439 Updated by: derick@php.net Reported By: john@scl.co.uk -Status: Open +Status: Bogus Bug Type: Regexps related PHP Version: 4.0.5 New Comment: Sorry, but the bug system is not the appropriate forum for asking support questions. Your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2001-09-25 14:41:40] john@scl.co.uk These 2 are OK: ereg_replace('..','b','aa') -> b ereg_replace('.+','b','aa') -> b But this is wrong: ereg_replace('.*','b','aa') -> bb You can "fix" it by binding to the beginning: ereg_replace('^.*','b','aa') -> b but not by binding to the end: ereg_replace('.*$','b','aa') -> bb ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=13439&edit=1

« previous php.bugs (#9192) next »