M
Mel
I just need the content between <body> and </body> of a message
How can i do this from http_request.responseText string ?
thanks
How can i do this from http_request.responseText string ?
thanks
I just need the content between <body> and </body> of a message
How can i do this from http_request.responseText string ?
You need it or want to set it?
If you need it in the http_request.reponseText string (ie that string
is/has some JavaScript) then just use document.body.innerHTML.
To set it
document.body.innerHTML = http_request.responseText;
Peter
You mean apart from the unescaped slash in the middle of the regex, the
fact that a dot only matches 1 character, and also that a dot won't match a
newline?
This would probably work most of the time:
/<body[^>]*>((?:.|\n)*)<\/body>/
Peter said:[...] Won't this work?
/<body>(.)</body>/
Peter said:[...] Won't this work?
/<body>(.)</body>/
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.