note 21369 deleted from function.preg-replace by torben
| From: | torben@php.net | Date: | Fri, 10 May 2002 01:37:02 +0000 |
| Subject: | note 21369 deleted from function.preg-replace by torben | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-30411@lists.php.net to get a copy of this message | ||
Being a novice in php, I ran into a lot of difficulties using preg_replace... the difference from
perl is that you have the regex in a string "...regex...". so when using special
characters, you have to escape <i>twice</i>
for example, to replace all $ by \$ you have to do:
$Entry = preg_replace("/\\$/", "\\\\$", $Entry);