RE: [PHP] ereg_replace and strings with "

From: Date: Mon, 20 Nov 2000 03:42:31 +0000
Subject: RE: [PHP] ereg_replace and strings with "
Groups: php.general 
Request: Send a blank email to php-general+get-26190@lists.php.net to get a copy of this message
just like in variables: "here is the \"string\" " to be understood as a double quote you will first need a backslash there. Now, (I guess, not too sure but would definitely try it ) that you also will have to escape backslashes and single quotes to be taken literally. so this might be your solution : \\\" Try it... and Let us know. P.S: another thing: if you would use single quotes for the Regular Expression string then there would be no need escaping Double ones. Cheers, Maxim Maletsky. -----Original Message----- From: Robert Mena [mailto:rt_mena@yahoo.com] Sent: Monday, November 20, 2000 12:18 PM To: php mailing list Subject: [PHP] ereg_replace and strings with " hi, I am trying to search and replace some text with another. I am trying to use ereg and ereg_replace but I got stucked in a problem : how do I specify that the string it should find/replace should have double quotes (") somewhere in the middle of it? For ex. original test = my test was "ok" but I did not complete it. I want to replace "ok" (with the quotes) with another thing. Using \" in the search string did not work. thanks. __________________________________________________ Do You Yahoo!? Yahoo! Calendar - Get organized for the holidays! http://calendar.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#26190) next »