Hello,
I have a script that is copying HTML files from one folder to another. I need to add to this script so that I can target a specific div '<div id="page_content_top_stage">' and grab all of the content in that div. The hard part is ignoring nested divs. In other words, the regex I have now will find the div I need but if there is a nested div tag, the regex stops at that inner '</div>' potentially missing a lot of needed content.
Is this something that can be done with regex and vbscript?
HTML code:
I have a script that is copying HTML files from one folder to another. I need to add to this script so that I can target a specific div '<div id="page_content_top_stage">' and grab all of the content in that div. The hard part is ignoring nested divs. In other words, the regex I have now will find the div I need but if there is a nested div tag, the regex stops at that inner '</div>' potentially missing a lot of needed content.
Is this something that can be done with regex and vbscript?
HTML code:
Code:
<div id="page_content_top_stage"> <br><div></div>
<!-- InstanceBeginEditable name="content up" -->
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1" height="100%"><img src="../gui_assets/gui_images/spacer.gif" width="1" height="627"></td>
<td width="740" valign="top"><img src="../gui_assets/gui_images/spacer.gif" width="740" height="1"><br>
</td>
</tr>
</table>
<!-- InstanceEndEditable --> </div>