Forum Moderators: coopster
<p> Some text </p>
<p> More text
<p> Innter <b>tag</b> </p>
As a result I want an array where every paragraph is a an element of array
Patterns like
/<p>(.*)<\/?p>/is - will match from the first to the last tag
/<p>([^<]+)<\/?p>/is - doesn't work if there are inner html tags.
So I need something that will match from <p> till next </?p>. I'm thanking about recursive matching, but can't create a working pattern.
There's no real easy way to negate a string (or another regular expression). I had a look at the look-ahead and look-behind operators:
[regular-expressions.info...] , but I don't really think they will help you.