#23662 [Opn->Bgs]: ereg_replace doesn't follow specs
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)