mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
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:
parent
378c28cc33
commit
d5292588e7
1 changed files with 4 additions and 2 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue