From d5292588e7e25fab2c777c44b84d47d0ad8fafd9 Mon Sep 17 00:00:00 2001 From: Monte Ohrt Date: Mon, 31 Jul 2000 15:51:13 +0000 Subject: [PATCH] update preg_replace() example git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@29414 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/pcre.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functions/pcre.xml b/functions/pcre.xml index b120037a7f..b6404f5921 100644 --- a/functions/pcre.xml +++ b/functions/pcre.xml @@ -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);