I have some text in the
tags such like
<p>This is text a</p><p>This is text ended without p</a>
I want to use Regex to match both classes and extract InnerText:
const string patternDesp = @"<p>(.+?)(</p>|</a>)";
But when I look at the m.Groups[1], it only returns 1 match. m.Groups[2] gives me
</a>
I have fixed this issue, it seems that I need to use
MatchCollectioninstead ofMatch.