Re: [webmin-devel] Regular expression help to fix bug in Sarg module (view.cgi)

"Colm Dougan" <[email protected]>
Newsgroups gmane.comp.web.webmin.devel
Message-ID <[email protected]>
On Jan 31, 2008 7:09 PM, David Harrison
<[email protected]> wrote:
>
> Lines 27 & 28 of sarg/view.cgi do the dirty work and they are as
> follows:
> $data =~ s/^[\000-\377]*<BODY.*>//i;
> $data =~ s/<\/BODY>[\000-\377]*$//i;

If i understand the problem correctly, I think making the .* after the
BODY non-greedy, by adding a question mark, will solve it, i.e. :

$data =~ s/^[\000-\377]*<BODY.*?>//i;

Colm

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.