I want to take paragraph or div from html, but if it don't contain form. For example:
<p><form>I don't want this text</form>and not this text</p>
<p>I want to take this text</p>
I have working variant, without form filter.
/(?:<(?:p|div)[^>]*>)(.*)(?:<\/(?:p|div)>)/iu
And not working variant with filter
/(?:<(?:p|div)[^>]*>)((?:.(?!<form))*)(?:<\/(?:p|div)>)/iu
Can you help me?