Article View: news.software.readers
Article #49901Re: [slrn] scornig by reference
From: Thorfinn
Date: Fri, 16 Jul 1999 00:00
Date: Fri, 16 Jul 1999 00:00
75 lines
4255 bytes
4255 bytes
In news.software.readers, on 16 Jul 1999 00:24:54 GMT
Zebee Johnstone <zebee@zip.com.au> wrote:
> In news.software.readers on 15 Jul 1999 10:23:20 GMT
> Zebee Johnstone <zebee@zip.com.au> wrote:
> >In news.software.readers on 15 Jul 1999 06:05:24 GMT
> >Thorfinn <thorfinn@netizen.com.au> wrote:
> >>works for me... Yes, possibly that should be:
> >>References: thorfinn[^@ ]*@[^@ ]*tertius\.net\.au[^@ ]*> +<[^>]+> +<[^>]+> *$
> >OK.. seems to work, although it seems to do 4 references...
> No.. doesn't work, looking closer.
> So looks like it's *only* getting stuff 3 back...
*nodnod* Sorry about that. I didn't make it clear what it was doing,
'cos I have a tendency to think in REs...
Let me go through the RE in detail.
You'll need all three of:
References: thorfinn[^@ ]*@[^@ ]*tertius\.net\.au[^@ ]*> +<[^>]+> +<[^>]+> *$
References: thorfinn[^@ ]*@[^@ ]*tertius\.net\.au[^@ ]*> +<[^>]+> *$
References: thorfinn[^@ ]*@[^@ ]*tertius\.net\.au[^@ ]*> *$
to get the third post after yours, second post after yours and first
post after yours.
This could be done cleaner (in one single RE) with gnu or perl REs...
but unfortunately slrn uses slang regexps (which is an *endless*
source of confusion, and I really do wish something could be done
about that).
Slang REs don't support the grouping operator, so putting all three
expressions on one line is impossible.
Now for a detailed explanation of the RE...
References: thorfinn[^@ ]*@[^@ ]*tertius\.net\.au[^@ ]*> +<[^>]+> *$
1------12----232----24--------------42----256678---85990
1--1: What it looks like. Literal character matches, nothing special.
2--2: [^abc] is an RE that matches "all characters *except* a, b or c"
so this section matches anything except an @ or a space. "*"
means "match zero or more of the previous atom".
So this matches any number of characters until it finds a space
or @.
3: Just match an @ character.
4--4: Literal matches for everything. \. means match a "." character
because "." in an RE means "match any character".
5: Match a closing angle bracket >
66: Match one or more spaces. + in an RE means "match one or more
of the previous atom".
7: Match an opening angle bracket <
8--8: [^>] is match any character except for >... so this is match
one or more characters of any kind until you find a >
99: Match zero or more spaces.
0: Match the "end of line". The expression must be at the "end of
the line" when it gets here.
You probably don't need the sections labeled 2--2:, because they're
there because I change around my headers sufficiently to mess up the
RE.
Meep,
Thorf
--
<a href = "http://www.netizen.com.au/"> thorfinn@netizen.com.au </a>
O is for Orestes, who choked on his food
P is for Petra, who nymphs stripped quite nude
-- Doug Atkinson <douga@io.com> in rec.games.roguelike.nethack
Technical Details
Message-ID:
<slrn7ot7ol.iu7.thorfinn@netizen.com.au>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<slrn7oq1hs.bd1.zebee@zipper.zip.com.au> <slrn7oquh2.4jv.thorfinn@netizen.com.au> <slrn7ordlj.2e0.zebee@zipper.zip.com.au> <slrn7osuv9.fgm.zebee@zipper.zip.com.au>Show Full Headers
Complete Article Headers
Message-ID: <slrn7ot7ol.iu7.thorfinn@netizen.com.au> Subject: Re: [slrn] scornig by reference Date: Fri, 16 Jul 1999 00:00:00 +0000 From: thorfinn@netizen.com.au (Thorfinn) References: <slrn7oq1hs.bd1.zebee@zipper.zip.com.au> <slrn7oquh2.4jv.thorfinn@netizen.com.au> <slrn7ordlj.2e0.zebee@zipper.zip.com.au> <slrn7osuv9.fgm.zebee@zipper.zip.com.au> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 501579543 Cache-Post-Path: centauri.unico.com.au!unknown@venus.dev.unico.com.au X-WhoIsNetizen: See http://www.netizen.com.au/ about Netizen. X-Newsgroup: news.software.readers X-Complaints-To: abuse@connect.com.au X-Trace: perki.connect.com.au 932093719 3321 202.21.8.159 (16 Jul 1999 02:55:19 GMT) Organization: Netizen - http://netizen.com.au/ X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) X-Countdown-To-Y2K: 24 weeks 10 hours 22 minutes 42 seconds to go User-Agent: slrn/0.9.5.7 (UNIX) Reply-To: thorfinn@netizen.com.au NNTP-Posting-Date: 16 Jul 1999 02:55:19 GMT Newsgroups: news.software.readers X-Religion: linux slrn mutt vim