Thread View: news.software.readers
6 messages
6 total messages
Started by David Gerard
Sat, 09 Jan 1999 00:00
slrn regexp FAQ?
Author: David Gerard
Date: Sat, 09 Jan 1999 00:00
Date: Sat, 09 Jan 1999 00:00
19 lines
1471 bytes
1471 bytes
I've looked through the documentation that comes with slrn, and can't find anything that fully details the regular expression syntax for slrn. Is this available anywhere? (What I'm trying to do is get slrnpull to kill all articles with an all-numeric Message-ID coming from home.com - in order to kill the spam flood in alt.religion.scientology without killing everything else from home.com .) -- http://thingy.apana.org.au/~fun/ http://suburbia.net/~fun/scn/ CD burners and MP3s: the utter annihilation of the music industry by the computer industry continues apace. Hip! Hip! Hooray! Hip! Hip! Hooray!
Re: slrn regexp FAQ?
Author: Jan Hlavacek
Date: Sat, 09 Jan 1999 00:00
Date: Sat, 09 Jan 1999 00:00
16 lines
1455 bytes
1455 bytes
On 9 Jan 1999 05:07:01 GMT, David Gerard <fun@thingy.apana.org.au>
wrote:
> I've looked through the documentation that comes with slrn, and can't
> find anything that fully details the regular expression syntax for slrn.
>
> Is this available anywhere?
Look at the S-lang web page: http://www.s-lang.org/
--
Jan Hlav\'{a}\v{c}ek <lahvak@math.mps.ohio-state.edu> (BCC's will bounce)
home page: http://www.math.ohio-state.edu/~lahvak/
slrn page: http://www.math.ohio-state.edu/~lahvak/software/slrn.html
slrn documentation: http://www.math.ohio-state.edu/~lahvak/software/slrn/
Re: slrn regexp FAQ?
Author: David Gerard
Date: Sun, 10 Jan 1999 00:00
Date: Sun, 10 Jan 1999 00:00
25 lines
1756 bytes
1756 bytes
On 9 Jan 1999 05:51:46 GMT, Jan Hlavacek <lahvak@math.mps.ohio-state.edu> wrote:
:On 9 Jan 1999 05:07:01 GMT, David Gerard <fun@thingy.apana.org.au>
:wrote:
:> I've looked through the documentation that comes with slrn, and can't
:> find anything that fully details the regular expression syntax for slrn.
:> Is this available anywhere?
:Look at the S-lang web page: http://www.s-lang.org/
Ah ha! So what I want is something like:
Message-ID: <\d*@
to get all message-IDs where the portion before the @ is entirely numeric?
(If * does what I think it does.)
--
http://thingy.apana.org.au/~fun/ http://suburbia.net/~fun/scn/
"They also sell the visible cow and dog, complete with anatomically correct
removable bowels!" (John VerBurg concerning http://www.sciplus.com/)
Re: slrn regexp FAQ?
Author: Dawn Owens-Nicholson
Date: Sun, 10 Jan 1999 00:00
Date: Sun, 10 Jan 1999 00:00
33 lines
1972 bytes
1972 bytes
David Gerard wrote:
> Ah ha! So what I want is something like:
>
> Message-ID: <\d*@
>
> to get all message-IDs where the portion before the @ is entirely numeric?
> (If * does what I think it does.)
No, it doesn't do what you think it does. In regular expressions, '*'
commonly means "0 or more repetitions of the previous character (or
construct)". Your regex will match "<@foobar.org>" which has no numbers at
all. Here, "<\d*@" means "<" followed by any number of digits (including no
digits--0 repetitions) followed by "@". You probably want
Message-ID: ^<\d+@
Because '^' will anchor the search at the beginning of the message-ID (the
only place "<" is legal in a message-ID; putting this in here will probably
speed the search slightly) and '+' means "1 or more repetions of the
previous character" in S-Lang regular expressions.
I haven't seen the message-IDs you're trying to match, but do these spammers
have access to some servers that will accept bad message-IDs? If so, you
might want to make the "<" optional: (if this isn't a problem, don't bother
matching for it)
Message-ID: ^<?\d+@
So, any message-ID that has at least one digit before the "@" will match.
Happy (spam-free) newsreading!
Re: slrn regexp FAQ?
Author: David Gerard
Date: Mon, 11 Jan 1999 00:00
Date: Mon, 11 Jan 1999 00:00
28 lines
1937 bytes
1937 bytes
On 10 Jan 1999 09:07:31 GMT, David Gerard <fun@thingy.apana.org.au> wrote:
:Ah ha! So what I want is something like:
: Message-ID: <\d*@
:to get all message-IDs where the portion before the @ is entirely numeric?
:(If * does what I think it does.)
Yep, the above works. Although Dawn Owens-Nicholson has written to advise
me that
Message-ID: ^<\d+@
is probably a better idea - ^ means beginning of message, + means *one
or more* repetitions of the previous regexp (* means *zero or more*).
(This is to eliminate messages from a particular piece of spamware.)
Are there any real newsreaders that generate message-IDs that are
all-numeric before the @ ? I'd want to excuse those from the cull :-)
--
http://thingy.apana.org.au/~fun/ http://suburbia.net/~fun/scn/
"They also sell the visible cow and dog, complete with anatomically correct
removable bowels!" (John VerBurg concerning http://www.sciplus.com/)
Re: slrn regexp FAQ?
Author: John E. Davis
Date: Mon, 11 Jan 1999 00:00
Date: Mon, 11 Jan 1999 00:00
14 lines
1181 bytes
1181 bytes
On 10 Jan 1999 09:07:31 GMT, David Gerard <fun@thingy.apana.org.au>
wrote:
> Message-ID: <\d*@
>
>to get all message-IDs where the portion before the @ is entirely numeric?
>(If * does what I think it does.)
If you want at least one digit, then use `+' instead of `*', i.e.,
Message-ID: <\d+@
--John
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads