help-gnu-emacs
[Top][All Lists]
Advanced

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

cleaning up a big regexp


From: Tory S. Anderson
Subject: cleaning up a big regexp
Date: Mon, 15 Sep 2014 07:15:17 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Using gnus I have a growing regexp that represents the criteria for bulk email 
and splits accordingly:

(setq my-gnus-bulk-regexp 
"\\(^From:.*\\(@maillist.codeproject.com\\|@papajohns-specials.com\\|@qomail.quikorder.com\\|@linkedin.com\\|@facebookmail.com\\|@plus.google.com\\|@twitter.com\\|@youtube.com\\|@linguistlist.org\\|sportsauthority.com\\)\\)\\|\\(^To:.*torysanderson@gmail.com\\)")

;; TODO make bulk-list
(setq nnmail-split-methods
       '(("mail.bulk" my-gnus-bulk-regexp)
        ...
 

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. 



reply via email to

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