The string
<div id="main">
content (is INT)
<div>some more content (is not INT) other content (also INT)</div>
</div>
I need to get the content
which is an INT. A simple strip all non-INT function will not work since other content
sometimes also is an INT. I cannot use a select child solution since it is always outside div and to select the content of <div id="main">
will also select the other div.
Thus is there a solution that can search the string from start for the first <
and remove the rest of the string when found.
(The structure cannot be altered)