Gnus development mailing list
 help / color / mirror / Atom feed
* Gnus REGEXP handling
@ 1996-02-24  7:35 d. hall
  1996-02-26  1:58 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: d. hall @ 1996-02-24  7:35 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----

I've been trying to customize my score file to handle a couple ambigious
subjects in a couple mailing lists.

Basically I need a way to REGEXP match something which might have several
elements in the center and that doesn't end with a specific character.
Reason why I'm mailing to this list is that I've noticed that Gnus regexp
matching does a couple things I haven't seen with the normal
isearch-regexp, which leads me to believe they don't use the same functions
or else there is a couple escaping conventions I'm missing.

Possible headers include

DCC/T/1-
DCCC/T/2+
DCC/YTTT/3-
RC/YTT/2++

(It's a database short script which I've been working on with a couple
friends of mine.  The designate "atoms" are within the field seperators "/"
and the "+-" are for emphasis as far as priority (i.e. what day of the week
it needs to be done by and the more "+-" there are, the more (de)emphasis
is required).  I've been using a score file to prioritize how I read them
to make sure.  Basically the REGEXP I'd like to compose...

[^R]\\([CT/][^Y]\\)+/[0-6][^-]

Now does the \\([exp][^exp]\\) work?  I saw listed in the sample SCORE file
examples on the Gnus faq a \\< (which I believe is supposed to match an
empty string according to the regexp syntax info node) and \\[ listing.
That last one baffles me.  Am I to assume that \\[ is escaped once and
becomes \[ which means just match "[" and the \\( can be used as a grouping
to mean "logically" match [abc] && [^def]?  I've been in a tizzy to get
this to work and the interactive isearch-regexp is helping me much.

d.
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBMS6/u4X26urqpgG1AQE5SAP8DLV64hdQ2oB3jBiblN+iBCrqO9i2gecz
aFP9xZ97Ei0JgWt2Rekjz83NmdsfgFMU95i7MvwILO/EiRq4b6hSEqwNUTjXBRH4
RkSKP2ZK3lip82y8wjTzJKtaZJUaYNOyJPKfJjQM1uXik8YLlUCBYbIxmGyWoysj
Ewg3Tz9uQ9A=
=Kv4L
-----END PGP SIGNATURE-----
-- 
                           ``Let's dance.''

                                ~ from mortal kombat, the movie


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Gnus REGEXP handling
  1996-02-24  7:35 Gnus REGEXP handling d. hall
@ 1996-02-26  1:58 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-02-26  1:58 UTC (permalink / raw)


dhall@illusion.apk.net (d. hall) writes:

> Reason why I'm mailing to this list is that I've noticed that Gnus regexp
> matching does a couple things I haven't seen with the normal
> isearch-regexp, which leads me to believe they don't use the same functions
> or else there is a couple escaping conventions I'm missing.

`isearch-regexp' is not really a good function to play with if you
want to deal with regexps in Elisp programs.  The reason is that what
you enter interactively does not require the quoting of characters you
need in Elisp characters.

If you want to search for "[" interactively, you say "\[".  In Elisp
you have to quote the "\", so you get "\\[".  Etc.

> Now does the \\([exp][^exp]\\) work?  

"\\([ABC][^D]\\)" will match the same as "[ABC][^D]".  Whether yoy
group an expression or not doesn't make any difference.
"\\([ABC][^D]\\)+", will match 1 more strings that match "[ABC][^D]". 

-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-02-26  1:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-02-24  7:35 Gnus REGEXP handling d. hall
1996-02-26  1:58 ` Lars Magne Ingebrigtsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).