Changes between Initial Version and Version 1 of Ticket #19855, comment 4
- Timestamp:
- 01/20/2012 12:42:19 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #19855, comment 4
initial v1 2 2 > Coding this wouldn't be hard: `preg_split('|</?pre[ >]|', $pee, -1, PREG_SPLIT_DELIM_CAPTURE)`, then go through the array and replace strings starting with `<pre` with incremental placeholder, keeping them for later in an `array('placeholder_#' => 'string', ...)`. 3 3 4 I used preg_match instead of preg_split. I didn't see a performance a significant performance difference either way. Let me know if you see any problems with the patch. The sample content did not work before the patch, and worked fine with the patch.4 I used preg_match_all instead of preg_split. I didn't see a performance a significant performance difference either way. Let me know if you see any problems with the patch. The sample content did not work before the patch, and worked fine with the patch.