Page 1 of 1

Stripping all but body from HTML

Posted: Thu Jul 20, 2006 10:27 pm
by dan.kotowski
I'm fairly new to regular expressions, but I've been looking around for a while and can't seem to figure out how to do this. I need to strip all but the body from an HTML file. So if the file looked like this:

Code: Select all

<html>
<head><title>Hello, world!</title></head>
<body>
This is the text to save.
</body>
</html>
the end result would be this:

Code: Select all

This is the text to save.
How would one do this?

Posted: Thu Jul 20, 2006 11:33 pm
by feyd
hey look at that, a thread just before yours answers this: viewtopic.php?t=51929 ;)