Sorry for the late answer, if anyone else came across this problem, here is my suggestion, assuming you have access to the page that you are reading from the source code.
Add an HTML comment like this
<div id="LiveArea">
Content here
</div>
Then match it to
htmlVal.match(/<\!\-\-LiveArea"\-\->(.*?)<\!\-\-EndLiveArea"\-\->/);
source
share