Stripping all but body from HTML
Posted: Thu Jul 20, 2006 10:27 pm
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:
the end result would be this:
How would one do this?
Code: Select all
<html>
<head><title>Hello, world!</title></head>
<body>
This is the text to save.
</body>
</html>Code: Select all
This is the text to save.