Article View: news.software.nntp
Article #66198Re: innreport error
From: Steve
Date: Thu, 17 Jul 2003 21:38
Date: Thu, 17 Jul 2003 21:38
47 lines
2371 bytes
2371 bytes
Jeffrey M. Vinocur wrote:
> In article <87he5khpyv.fsf@windlord.stanford.edu>,
> Russ Allbery <rra@stanford.edu> wrote:
>>
>>Okay, so that Perl code actually works. That makes me think that
>>something else strange is going on.
>
> Yeah :-/
>
> Steve, when you checked the value of $line before and after the
> regex, how paranoid were you? (In particular, can you do
> something like this: print "->$line<- ", length $line; and make
> sure there aren't any hidden characters that could somehow break
> things.)
>
>
Thanks for all your efforts on helping me here, really is appreciated.
:)
I've made the code as follows:
$line =~ s/^( # at the beginning
[{};] # match '{', '}', or ';'
| # OR
\" # a double quoted string
(?:\\.|[^\"\\])*
\"
| # OR
[^{};\"\s]+ # a word
)\s*//mox;
print "->$line<- ", length $line, "\n";
my $info = $1;
print "->$info<- ", length $info, "\n";
if (defined $info && $info) {
chomp $info;
}
When run, I get the following:
->section default {
<- 18
->#<- 1
Error in ../etc/innreport.conf line 12: must be 'section' instead of '#'
Technical Details
Message-ID:
<bf7516$ani$1@bananasplit.info>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.stueberl.de!feed.news.nacamar.de!newsfeed.icl.net!newsfeed.fjserv.net!news.itconsult.net!news.dizum.com!sewer-output!mail2newsReferences:
<bf3jb2$j5s$1@bananasplit.info> <87isq1hrmf.fsf@windlord.stanford.edu> <bf6v64$95r$1@bananasplit.info> <87he5khpyv.fsf@windlord.stanford.edu> <bf72uk$s4h$1@puck.litech.org>Show Full Headers
Complete Article Headers
Message-ID: <bf7516$ani$1@bananasplit.info> Subject: Re: innreport error Date: Thu, 17 Jul 2003 21:38:46 +0000 From: Steve <steve@nospam-goofer.co.uk> References: <bf3jb2$j5s$1@bananasplit.info> <87isq1hrmf.fsf@windlord.stanford.edu> <bf6v64$95r$1@bananasplit.info> <87he5khpyv.fsf@windlord.stanford.edu> <bf72uk$s4h$1@puck.litech.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.stueberl.de!feed.news.nacamar.de!newsfeed.icl.net!newsfeed.fjserv.net!news.itconsult.net!news.dizum.com!sewer-output!mail2news Newsgroups: news.software.nntp Organization: Bananasplit Lines: 46 X-Complaints-To: abuse@bananasplit.info User-Agent: Xnews/06.02.16 Mail-To-News-Contact: abuse@dizum.com