I have some HTML that I need to parse (in a large document) as text, and the portion I'm interested in looks like this:
...
<div id="whatever" class="whatever whatever">some title with <em>html</em> and other such tags in it, but never a div tag</div>
...
Now I want to get out of it the text within the DIV with the HTML. Here's what I have for the Regular expression (using groups):
<div id=\"whatever\" class=\"whatever whatever\">(?<title>[^</div>]*?)</div>
So the idea there is that I'll match the whole thing, and get a group with all the text up to the point where the < /div > occurs (as there's no other identifying factor for the end of the string).
The ^ in [] doesn't work because it's "any" of those characters, not the string "< /div >" that I want. Any ideas how I make this work?