in reply to Don't understand behavior of this split
If the regex has a capturing group (and yours has, the (\/p>)), then the result of that capture (here $1) is interleaved with the split chunks.
To avoid that, use the regex (?:<\/p>)?\s*<p> instead.
See split and perlre for more details.
|
|---|