Have you looked at regular expressions? They do exactly this.
"Sara" <[EMAIL PROTECTED]>
Sent by: To: "activeperl"
<[EMAIL PROTECTED]>
[EMAIL PROTECTED] cc:
veState.com Subject: Deleting HTML
code from a text file.
09/03/2003 05:31 AM
I have a couple of text files with html code in them.. e.g.
---------- Text File --------------
<html>
<head>
<title>This is Test File</title>
</head>
<body>
<font size=2 face=arial>This is the test file contents<br>
<p>
blah blah blah.........
</body>
</html>
-----------------------------------------
What I want to do is to remove/delete HTML code from the text file from a
certain tag upto certain tag.
For example; I want to delete the code completely that comes in between
<head> and </head> (including any style tags and embedded javascripts etc)
Any ideas?
Thanks in advance.
Sara.
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
