I get the full html code using WebClient. But I need to get the specified div from the full html using a regular expression.
eg:
<body>
<div id="main">
<div id="left" style="float:left">this is a <b>left</b> side:<div style='color:red'> 1 </div>
</div>
<div id="right" style="float:left"> main side</div>
<div>
</body>
if I need a div called 'main', the return function
<div id="left" style="float:left">this is a <b>left</b> side:<div style='color:red'> 1 </div>
</div>
<div id="right" style="float:left"> main side</div>
If I need a div called "left", the return function
this is a <b>left</b> side:<div style='color:red'> 1 </div>
If I need a div called "right", the return function
main side
How can i do this?
source
share