PHP 4.0 Bug #8610: ereg* complains without cause

From: Date: Tue, 09 Jan 2001 08:51:27 +0000
Subject: PHP 4.0 Bug #8610: ereg* complains without cause
Groups: php.dev 
Request: Send a blank email to php-dev+get-43518@lists.php.net to get a copy of this message
From: sam@ananova.com Operating system: solaris 2.7 PHP version: 4.0.4 PHP Bug Type: Calendar problems Bug description: ereg* complains without cause if (eregi('^(ab|)c$',$x)) print "blah: $x<br>\n"; complains with Warning: REG_EMPTY in /usr/local/ananova_v2/www/search/_index.php on line 31 and returns false regardless of $x yet: echo "c" | egrep '^(ab|)c$' echo "ac" | egrep '^(ab|)c$' echo "abc" | egrep '^(ab|)c$' outputs: c abc Removing the from my php expression | stops the complaint but ruins the pattern. My pattern intends to read (in english) Optionally prefixed by "ab" and matches "c" exactly. -- Edit Bug report at: http://bugs.php.net/?id=8610&edit=1

« previous php.dev (#43518) next »