in reply to Re: Re: Removing selective tags and content between
in thread Removing selective tags and content between

As far as I know, the lack of a body tag should not keep the browser from renedering the page. Most browsers are pretty forgiving when it comes that kind of stuff. A combination of the lines I showed above could be done as:
$test =~ s/<head>.+<\/head>|<html>|<\/html>|<body.*?>|<\/body>//sgi;
I can't see why this would have cleared the entire string but then again, I haven't seen the entire string you are trying to parse. Perhaps you could post a little more...

Replies are listed 'Best First'.
Re: Re: Re: Re: Removing selective tags and content between
by diamich (Initiate) on Oct 15, 2003 at 16:10 UTC
    Chris...when you replied to my last post, I noticed that your statement had changed from <body.+> to <body.*?> When I used <body.*?> it made all the difference and everything worked fine :)) Thanks so much for the help!
Re: Re: Re: Re: Removing selective tags and content between
by diamich (Initiate) on Oct 15, 2003 at 18:06 UTC
    Thanks for all the help Chris. When you replied I noticed that you said <body.*> when you had originally told me to use <body.+>....I put in <body.*> and everything worked fine. Thank you again.