Reputation: 401
Can somebody explain me why the following text:
<p>some text some text...</p>
<p>another text another <b>text</b>again</p>
can't be parsed with the following regular expression:
<p>.*?</p>
(to retrieve every paragraph). The regular expression that should match the text between the first opening <p> tag and the last closing </p> tag doesn't work either:
<p>.*</p>
Upvotes: 0
Views: 694
Reputation: 170158
Besides the fact that it's dangerous to parse (X)HTMl with regex, try with the RegexOptions.Singleline
Upvotes: 0