From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: torys.anderson@gmail.com (Tory S. Anderson) Newsgroups: gmane.emacs.help Subject: cleaning up a big regexp Date: Mon, 15 Sep 2014 07:15:17 -0400 Message-ID: <87mwa1uoca.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1410779750 14530 80.91.229.3 (15 Sep 2014 11:15:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Sep 2014 11:15:50 +0000 (UTC) To: emacs list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 15 13:15:42 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XTUFy-0001Ag-P4 for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Sep 2014 13:15:42 +0200 Original-Received: from localhost ([::1]:58826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTUFy-0005rm-3v for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Sep 2014 07:15:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTUFc-0005rI-Vy for help-gnu-emacs@gnu.org; Mon, 15 Sep 2014 07:15:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTUFb-0000lB-NJ for help-gnu-emacs@gnu.org; Mon, 15 Sep 2014 07:15:20 -0400 Original-Received: from mail-yk0-x22b.google.com ([2607:f8b0:4002:c07::22b]:58516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTUFb-0000l1-IL for help-gnu-emacs@gnu.org; Mon, 15 Sep 2014 07:15:19 -0400 Original-Received: by mail-yk0-f171.google.com with SMTP id 79so1977752ykr.30 for ; Mon, 15 Sep 2014 04:15:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=zesxThqylLKNbBA8DapW3lL9GdWT2/sFpf5nCJV4l5U=; b=FRoDjeLQMb4MB2E7BYqgOzDQKGYf7ge6nP1uQpZzI2526B6NMy1p2jQyrBn/+qSZw1 xuJpe+zn9voXdjln92pa/CTCMlH9g8HlZaacx/6yKoifXZ7AAPvNuSZVYnZ0+qc5CrAL sF0r3RyANLbI2alyi562JgjQYrrWOb8iR4upwP1POG8t59drpsHYeYuf4wZBI1uAYXdY jHfdLxdOe7nVxXc3YYHHEPZP3P/MC9msdNdg/+mU7NrhaqEYiHh6Ss9yZ686fUnQu7kP 16sqUdeSahZGJMCxzKV9ExlPrArpMO5G8oKYrnTWbAmHjgowTfXipQplMH88/ahgNSnR aE2g== X-Received: by 10.236.11.6 with SMTP id 6mr651146yhw.90.1410779718785; Mon, 15 Sep 2014 04:15:18 -0700 (PDT) Original-Received: from localhost.localdomain ([2601:0:a000:4a1:ee55:f9ff:feb5:5589]) by mx.google.com with ESMTPSA id v31sm3933734yha.16.2014.09.15.04.15.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Sep 2014 04:15:18 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c07::22b X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99906 Archived-At: 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.