[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cleaning up a big regexp
From: |
Michael Albinus |
Subject: |
Re: cleaning up a big regexp |
Date: |
Mon, 15 Sep 2014 13:41:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
Joost Kremers <joost.m.kremers@gmail.com> writes:
> There's the function `regexp-opt', which takes a list of strings and
> returns a regular expression that will match any of those strings.
> Perhaps you can use that?
regexp-opt cannot handle meta characters like "*". The OP showed such a regexp.
Maybe somthing like this works (untested):
(setq my-gnus-bulk-regexp
(concat
"^\\(From:.*@"
(regexp-opt
'("maillist.codeproject.com"
"papajohns-specials.com"
"qomail.quikorder.com"
"linkedin.com"
"facebookmail.com"
"plus.google.com"
"twitter.com"
"youtube.com"
"linguistlist.org"
"sportsauthority.com")
'par)
"\\)\\|\\(To:.*torysanderson@gmail.com\\)"))
Best regards, Michael.
- cleaning up a big regexp, Tory S. Anderson, 2014/09/15
- Re: cleaning up a big regexp, Joost Kremers, 2014/09/15
- Re: cleaning up a big regexp, Tory S. Anderson, 2014/09/15
- Re: cleaning up a big regexp,
Michael Albinus <=
- Re: cleaning up a big regexp, Tory S. Anderson, 2014/09/15
- Re: cleaning up a big regexp, Michael Albinus, 2014/09/15
- Re: cleaning up a big regexp, Stefan Monnier, 2014/09/15
- Re: cleaning up a big regexp, Michael Albinus, 2014/09/15
- Thanks! Re: cleaning up a big regexp, Tory S. Anderson, 2014/09/15
- Re: cleaning up a big regexp, Stefan Monnier, 2014/09/15
- Regexp in nnmail-split-methods (was Re: cleaning up a big regexp), Tory S. Anderson, 2014/09/16
- Message not available
- Re: Regexp in nnmail-split-methods (was Re: cleaning up a big regexp), sokobania . 01, 2014/09/16
- RESOLVED Re: Regexp in nnmail-split-methods (was Re: cleaning up a big regexp), Tory S. Anderson, 2014/09/17