I need to write a regular expression which will look a div element with an ID="test1"
in html and if it does not find it only then it should look for div element with ID="test2"
e.g.
<div id="test1">
some stuff inside test1
</div>
<div id="test2">
some stuff inside test2
</div>
if div id="test1"
is present then i need the text "some stuff inside test1". if there is no div with id="test1"
only then it should look div with id="test2"
and get me the text inside "test2" which is in this case "some stuff inside test2"