I have a string in .net.
<p class='p1'>Para 1</p><p>Para 2</p><p class="p2">Para 3</p><p>Para 4</p>
Now, I want to get only text inside the tag p (Para 1, Para 2, Para 3, Para4).
I used the following regular expression but it doesn't give me expected result.
(?<=<p.*>).*?(?=</p>)
If I use (?<=<p>).*?(?=</p>)
it will give Para 2 and Para 4 which both p tags doesn't have class attribute?
I'd like to know what's wrong with (?<=<p.*>).*?(?=</p>)
that code.