Forum Moderators: coopster
{tag1}#*$!x{p}ssss{/p}{/tag1}
{tag1}#*$!x{p}ssss{/p}{tag1}
{tag1}#*$!x{tag1}
{tag1}#*$!x{p}ssss{tag1}#*$!xx{/tag1}{/p}{/tag1}
what i am interested is the value that appears with in tag1-pair and SKIP p-tag value IF it does not have a tag1-pair inside it, if it is found then fetch that as well.
additionally, it is possible that tag1 is incorrectly closed, in that case i must end my search on finding an opening tag1 without closing the previous and make a separate array of such strings so that i can fix those values.
i tried so many things with lookahead and lookbehind assertions with backreference. but in vain. before i go to a php solution i wanted to know if anybody here can solve this with regex.