From: lawrence mitchell <s0198183+ding@sms.ed.ac.uk>
Subject: Re: A RE: AW: "collapser", anyone...?
Date: Fri, 06 Jun 2003 11:11:02 +0100 [thread overview]
Message-ID: <87vfvjwm6h.fsf@yam.vegetable.demon.co.uk> (raw)
In-Reply-To: <hh7k7z4yeq.fsf@blah.pl> (Maciej Matysiak's message of "Fri, 06 Jun 2003 06:34:21 +0200")
Maciej Matysiak wrote:
[...]
> could you please provide an example: how do i get with regexp-opt
> the equivalent of "[Aa][Nn][Tt][Ww]\\.?"? maybe it's simpler to use
> that function, but one needs to type a lot and think of at least few
> possible variations (in this particular case). the above regexp takes
> care of everything and doesn't look scary (imho).
You don't :). You (let ((case-fold-search t)) ...) in
`message-strip-subject-re'.
Then you can do things like:
(regexp-opt
'("antw." "aw" "sv" "re"))
=> "a\\(?:ntw\\.\\|w\\)\\|re\\|sv"
Which I think is certainly easier to read than all the grouping
constructs, and, as an extra bonus, it's more efficient at
matching.
Additionally, this makes it easier to customize
`message-subject-re-regexp', since one can just ask for a list
of strings, and then do some magic behind the scenes. The user
need not know the ins and outs of Emacs' regexps.
> i think that the message-subject-re-regexp i've made up with
> concatenated regexp is quite readable. but ymmv :)
perlist ;).
--
lawrence mitchell <s0198183+ding@sms.ed.ac.uk>
next prev parent reply other threads:[~2003-06-06 10:11 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-31 23:23 A RE: SV: " Steinar Bang
[not found] ` <hhhe7ak6ph.fsf@blah.pl>
2003-06-01 21:34 ` Steinar Bang
2003-06-01 21:51 ` Steinar Bang
2003-06-02 9:37 ` Niklas Morberg
[not found] ` <hhn0gy39il.fsf@blah.pl>
2003-06-04 7:33 ` Niklas Morberg
[not found] ` <hh8yshzuup.fsf@blah.pl>
2003-06-05 5:53 ` Steinar Bang
2003-06-05 6:48 ` Niklas Morberg
2003-06-09 20:26 ` Steinar Bang
2003-06-15 12:07 ` Kai Großjohann
2003-06-20 5:17 ` Steinar Bang
2003-06-15 12:06 ` Kai Großjohann
2003-06-05 17:25 ` A " Ted Stern
[not found] ` <hh7k7z4yeq.fsf@blah.pl>
2003-06-06 10:11 ` lawrence mitchell [this message]
[not found] ` <hhd6hpxel9.fsf@blah.pl>
2003-06-09 20:47 ` Steinar Bang
2003-06-04 13:56 ` A RE: SV: " Johan Bockgård
2003-06-02 16:10 ` Randal L. Schwartz
2003-06-02 17:00 ` Lloyd Zusman
2003-06-02 17:05 ` Lloyd Zusman
2003-06-02 17:50 ` Harry Putnam
2003-06-03 6:12 ` Kai Großjohann
2003-06-03 6:16 ` Kai Großjohann
2003-06-04 15:56 ` Martin Thornquist
2003-06-03 11:49 ` Colin Marquardt
2003-06-03 12:13 ` Norbert Koch
2003-06-04 5:34 ` Oystein Viggen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vfvjwm6h.fsf@yam.vegetable.demon.co.uk \
--to=s0198183+ding@sms.ed.ac.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).