pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pan-users] Re: Regular expressions


From: Duncan
Subject: [Pan-users] Re: Regular expressions
Date: Thu, 05 Aug 2004 06:52:41 -0700
User-agent: Pan/0.14.2.91 (As She Crawled Across the Table)

Ronny Hippler posted <address@hidden>, excerpted below, 
on Tue, 03 Aug 2004 20:03:24 -0400:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
>       Help! I have googled and googled and can't come up with a
> solution. I am trying to create a rule or score using reg-ex. Using the
> create score option it rejects anything I try to put in. if I try to
> create a filter/rule it doesn't complain but it doesn't match either. I
> need to find all articles with "Al " in it. what is the proper syntax for
> that in PAN? TIA

Two things:

1) Pan's regex is case insensitive by default.  Therefore, if "Al "
matches, so will "AL " and "al " and "aL ".  In perl, there's ways around
that, but I don't know how "compatible" the pcre (perl compatible regular
expressions) library actually is, for this sort of thing.

2) Pan's filtering is currently limited to the point of being handicapped,
in that it is limited to matching certain overview headers.  It can't even
match all headers, let ALONE the entire post including body.  Therefore,
you simply CANNOT match all articles with "Al " in them, using pan's own
filters.  You can match all of them with "Al " in the subject, author, or
other matchable overview headers, but that's it.  This has been extremely
frustrating for a number of us users.  Unfortunately, it hasn't been
frustrating enough for anyone with the talent to code up a patch to change
it, to get them to do it, and Charles (back when he had time and was more
active on PAN) agreed it needed to be done but said it was going to be
back-burner for some time, which I took to mean he thought it needed done
before the nebulous 1.0 release, but that could be /years/ away.

If you need to match the rest of the headers, the body, or the entire
message, you'll need to use an external search method.  Keep in mind that
once the message is actually downloaded, you can search the pan cache, as
pan stores the messages in text format there.  You don't say what you are
trying to do after the match, but finding them shouldn't be a problem,
using your usual file system find tools, on whatever OS you are using PAN
on.

-- 
Duncan - List replies preferred.   No HTML msgs.
"They that can give up essential liberty to obtain a little
temporary safety, deserve neither liberty nor safety." --
Benjamin Franklin






reply via email to

[Prev in Thread] Current Thread [Next in Thread]