pan-users
[Top][All Lists]
Advanced

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

RE: [Pan-users] Composing regex for Pan


From: Paul Hudson
Subject: RE: [Pan-users] Composing regex for Pan
Date: Thu, 11 Mar 2004 14:04:02 -0000

It did make it to me at least.

What have you tried? 

What rule (expressed in English :-) are you trying to create? I think, from
your examples, it might be:

Match all subject lines with at least one word that's at least two letters
long, all in upper case?

Something like

 \b[:upper:]{2,}\b

looks like it might work (not tested, though) - as long as the regexps in
Pan are really PCRE ones enough to support the [: notation (see
http://www.pcre.org/pcre.txt). An equivalent is

(?-i)\b[A-Z]{2,}\b

(also not tested)

(The (? notation is how options like caseless matching are changed.)

P.





-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of Michael
R. McCarrey
Sent: 08 March 2004 19:43
To: Pan users list
Subject: [Pan-users] Composing regex for Pan

I tried sending this on Saturday, but it never appeared on the list. I
apologise for resending it, should it pop up later.
------------------------
Hi All,

I'm using Pan 0.14.2 on Linux.

I've been pulling my hair out (what little of it remains, that is), trying
to construct a regex mainly to filter out subjects that contain all caps, as
in: "HAVE EVERYTHING NOW!" amd "MAKE YOUR WILLY BIGGER TODAY", as well as
things like "*** GET IT NOW ***" and "$$$$ MAKE MORE mOney ToDaY $$$$$".

I've waded through the source tree and docs, looking for something to
explain how to construct a regex that will match strings like those, but to
no avail. My programming experience is limited to BASIC and Assembly, so
anything in C, much more involved than the K&R's "hello world" looks like
someone was very angry with the alphabet. A Python is a large aquatic snake
and women wear perls around their necks (which might be most of the
problem).

Earlier in the list, someone commented that Pan's regex parsing was case
insensitive (and had to be enabled manually - "how" was not mentioned),
which explains, I think, why [A-Z] [^a-z] makes everything disappear.

I installed the regex coach awhile back to help me do this, but what seems
to work with it, either does nothing in Pan, or eliminates everything.

The web is a wasteland of things that work for everyone else, too.

I'm still working on it, but any suggestions would be most appreciated.

Thanks,

Mike

--
Professionals built the Titanic ...
   Amateurs built the Ark
Forever, oh Lord, Thy Word is Settled in Heaven. Psalms 119:89




_______________________________________________
Pan-users mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/pan-users







reply via email to

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