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.
In reply to Re: Don't understand behavior of this split
by moritz
in thread Don't understand behavior of this split
by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |