#23662 [Opn->Bgs]: ereg_replace doesn't follow specs

From: Date: Fri, 16 May 2003 19:36:15 +0000
Subject: #23662 [Opn->Bgs]: ereg_replace doesn't follow specs
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39810@lists.php.net to get a copy of this message
 ID:               23662
 Updated by:       derick@php.net
 Reported By:      jesse at eonstreet dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: XP
 PHP Version:      4.3.1
 New Comment:

Sorry, but 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 as this bug system
is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

^ means beginning of sentence
$ means end of sentence

you were only matching the exact string "tes" here.

	


Previous Comments:
------------------------------------------------------------------------

[2003-05-16 13:25:50] jesse at eonstreet dot com

These lines of code seem to be invalid:

$text = "tes test tester";

$text = ereg_replace("^tes$","",$text);

echo $text;
// ouptu is | tes test tester |

I've test this with every possible combination of acceptable ereg
associations and nothing... I've stopped using ereg and only now use
preg functions.

Can anyone explain why this does work?



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=23662&edit=1



Thread (2 messages)

« previous php.bugs (#39810) next »