note 65333 rejected from function.preg-replace by bjori
| From: | bjori@php.net | Date: | Fri, 28 Apr 2006 21:42:53 +0000 |
| Subject: | note 65333 rejected from function.preg-replace by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-110042@lists.php.net to get a copy of this message | ||
Note Submitter: addsmgt at gmail dot com
----
In the example 1, "Convert HTML to text" you see as the search pattern:
'@&#(\d+);@e'); // evaluate as php
and its replace string as:
'chr(\1)');
This last didn't produce the desired result. The correct string is:
chr('\1'));