RE: [PHP-DB] Exact String replace with eregi_replace()

From: Date: Fri, 08 Feb 2002 14:46:32 +0000
Subject: RE: [PHP-DB] Exact String replace with eregi_replace()
Groups: php.db 
Request: Send a blank email to php-db+get-16681@lists.php.net to get a copy of this message
First, the example you give will replace "is" with "," if "is" is the ONLY work in the line. You indicate this with the ^$ construct. Are you trying to replace only the first occurrence if "is"? -----Original Message----- From: Desikan [mailto:desikb4u@fastmail.fm] Sent: Friday, February 08, 2002 6:42 AM To: php-db@lists.php.net Subject: [PHP-DB] Exact String replace with eregi_replace() hi I'm trying to replace the exact match of 'is' with ','.. But all the matches of 'is' in the string gets replaced.... how can i avoid this??? <?php echo ereg_replace ("^is$", ",", "This is a dismissal of windows based technology"); ?> rgds, Desikan -- Desikan desikb4u@fastmail.fm -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#16681) next »