Article View: news.software.readers
Article #148614Re: [Xnews] Quoted text and QuoteRegex-QuoteChars
From: »Q«
Date: Thu, 20 May 2004 23:54
Date: Thu, 20 May 2004 23:54
95 lines
4348 bytes
4348 bytes
Sherkan <alderaan_bay.SIN.SPAM@SPAM.NO.yahoo.es> wrote in
<news:Xns94F054ED4E4ikaruskatakrus@130.133.1.4>:
> Hi,
>
> I searched google, here now..., but nowhere says which are the
> parameters and what they mean and in result how configure the
> quote string.
>
> I'm meaning that nowhere is explained what means an asterisc (*)
> for xnews, and inverted bar (\), etc...
It's in pcre.html, in your Xnews directory. Looking for info about
scoring leads to that file, but looking for quote regex does not lead
there so easily, as you've found.
> Can someone explain definitively how we must configure it?
>
> I'm using now this string
>
> ^\s*([a-zA-Z]*>\s|[>:)}|])
>
> that I found googling in google groups, but I don't know its
> meaning. I was searching for something to make quoted text from
> strings as "adkfasdf>" and this works... but, why?, what is the
> (^) meaning here?
It matches the beginning of a line -- in this case, it's making sure we
are only looking at the beginning of lines for the quote string.
> , what about (\)
\ is an escape character. \s matches whitespace, whereas s would match
only the letter s.
> or (|)
This is a logical OR.
> or the (*)?
This means the preceding may occur any number of times. \s* will match
any number of whitespaces.
> and the brackets ([)
Hard brackets are used to define a character class. [a-zA-z] is the
class of alphabetic characters of both cases. The * after it indicats
we want to match any number of alphabetic characters. (Any number does
include zero.) The character class [>:)}|] will match any one of those
characters between the [ brackets ].
> and (()
The ( parenthesis ) are delimiters; in the example above, it is
marking off the logical OR provided by the | .
> or {?
There's not one in the regex you quoted, but there is a }. Inside the
character class [ brackets ], it has no special meaning -- it's just a
literal } character.
> Maybe is similar to C language, maybe not, but I don't know and in
> the manual I can't see an explaining comment to that. And nor
> about the real difference between QuoteRegex and QuoteChars. Which
> one is better to use?
Hmm, I am not sure. It looks as though the QuoteChars option is there
for people who do not have to use regex, so they can just list the
single quote characters there. It also looks like Xnews will use both
QuoteRegex and QuoteChars when trying to decide what is a quoted line.
For what you want to do, you definitely need QuoteRegex.
> Sorry about these amount of questions but I haven't found answers
> anywhere. :-|
>
> Bye.
I don't know if what I've written will really help or not -- if not,
maybe read through pcre.html then read my post again. Or maybe this
will help:
> ^\s*([a-zA-Z]*>\s|[>:)}|])
12223333333333333333333333
1 match the start of a line
2 followed by any number of spaces
3 followed by either
any number of alphabetical characters, a >, and a space
or
a >, :, ), }, or |
--
»Q«
Technical Details
Message-ID:
<MrQ94EFC05A32AD2itsmeitsQ@QsFQDN.dyndns.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed.vmunix.org!fu-berlin.de!uni-berlin.de!not-for-mailReferences:
<Xns94F054ED4E4ikaruskatakrus@130.133.1.4>Show Full Headers
Complete Article Headers
Message-ID: <MrQ94EFC05A32AD2itsmeitsQ@QsFQDN.dyndns.org> Subject: Re: [Xnews] Quoted text and QuoteRegex-QuoteChars Date: Thu, 20 May 2004 23:54:32 GMT From: »Q« <boxcars@gmx.net> References: <Xns94F054ED4E4ikaruskatakrus@130.133.1.4> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed.vmunix.org!fu-berlin.de!uni-berlin.de!not-for-mail Newsgroups: news.software.readers Organization: we don't need no stinkin' organization Lines: 95 X-Trace: news.uni-berlin.de X415G9JATTlesqO1dNJpWw+xT503BZpklUN8W8Z8C1CMCL1Pl/ X-Orig-X-Complaints-To: <http://www.cybergecko.com/complain.htm> X-Face: *#`F(_&o, GRH~~$V&ByU1LZAWc]JgxuT`Pv2y0`&JE`(=*PcC>#m2]xv]p, i|9mDJ+8dGMJl`V[!z]\N}qrLTHjU]Sew>rQBShT_8.(0Q(iH, Gu7k|y/)^!@oVydVrix*#|-|u2~zgA'U3nQ_fa#jXvcGL[9f:>8?U=hXYK3D~*}Gq$TjPe1WXEFLGTiB3ot!oMH"'(Jop0(\0C