update preg_replace() example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@29414 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Monte Ohrt 2000-07-31 15:51:13 +00:00
parent 378c28cc33
commit d5292588e7

View file

@ -403,7 +403,8 @@ $search = array ("'<script[^>]*?>.*?</script>'si", // Strip out
"'&(iexcl|#161);'i",
"'&(cent|#162);'i",
"'&(pound|#163);'i",
"'&(copy|#169);'i");
"'&(copy|#169);'i",
"'&#(\d+);'e"); // evaluate as php
$replace = array ("",
"",
@ -416,7 +417,8 @@ $replace = array ("",
chr(161),
chr(162),
chr(163),
chr(169));
chr(169),
"chr(\\1)");
$text = preg_replace ($search, $replace, $document);
</programlisting>