[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cleaning up a big regexp
From: |
Tory S. Anderson |
Subject: |
Re: cleaning up a big regexp |
Date: |
Mon, 15 Sep 2014 07:26:17 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
That command would shrink the regexp and make it more efficient, but my goal
here is to be able to more easily read and append to it, rather than optimize
it. I would like to be able to have a list, maybe something like:
("^From:.*" ((".*@bulk1.com")
(".*@bulk2.com")
(".*@bulk3.com")))
I'm new enough to [e]lisp that I'm not sure what list->string concatenation
functions would do the trick here.
Joost Kremers <joost.m.kremers@gmail.com> writes:
> Tory S. Anderson wrote:
>> Using gnus I have a growing regexp that represents the criteria for bulk
>> email and splits accordingly:
>
> [...]
>
>> Is there a way to clean this up to make it both more readable and more
>> easily editable? It seems like keeping some kind of list would be the
>> way to do it, instead of an ever-lengthening string.
>
> 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?
- 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 <=
- Re: cleaning up a big regexp, Michael Albinus, 2014/09/15
- 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