note 100463 added to function.ereg-replace

From: Date: Mon, 18 Oct 2010 02:11:03 +0000
Subject: note 100463 added to function.ereg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-173234@lists.php.net to get a copy of this message
Be careful, don't replace all ereg_replace() with str_replace() as many people will likely to recommend if there is regular expression stuffs, or your script will stop running !!! Example : replace the (.) at the end of the text with (...) <?php $text = "This is a simple text."; print( ereg_replace( "\.$", "...", $text ) ); ?> Test with str_replace() you will find it's not working. ---- Server IP: 60.244.128.222 Probable Submitter: 118.167.46.229 ---- Manual Page -- http://www.php.net/manual/en/function.ereg-replace.php Edit -- https://master.php.net/note/edit/100463 Del: integrated -- https://master.php.net/note/delete/100463/integrated Del: useless -- https://master.php.net/note/delete/100463/useless Del: bad code -- https://master.php.net/note/delete/100463/bad+code Del: spam -- https://master.php.net/note/delete/100463/spam Del: non-english -- https://master.php.net/note/delete/100463/non-english Del: in docs -- https://master.php.net/note/delete/100463/in+docs Del: other reasons-- https://master.php.net/note/delete/100463 Reject -- https://master.php.net/note/reject/100463 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#173234) next »