Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Lars Tobias Borsting <larstobi@itea.ntnu.no>
Subject: nnmail-split-fancy regexps confusing
Date: Tue, 06 Jul 2004 01:53:38 +0200	[thread overview]
Message-ID: <8jfhdsmj9j1.fsf@kamel.stud.ntnu.no> (raw)

Hi!

I have recently set up my mail splitting with nnmail-split-fancy, and it
is working well thaks to many trials and fails. How are the regexps
evaluated?

For example:

nnmail-split-fancy
  '(| (any "MYREGEXP" "mail.smith"))

MYREGEXP is like this: "(john|lisa)\.smith@ourmail\.com".

This is supposed to be matching "john.smith@ourmail.com" and
"lisa.smith@ourmail.com". For this to work in gnus fancy splitting it
must be written like this in .gnus.el:

nnmail-split-fancy
  '(| (any "\\(john\\|lisa\\)\\\.smith@ourmail\\\.com" "mail.thing"))

So basically I have to add two backslashes in front of each regexp
special character.

Why is this? Isn't it more logical to be able to write the regexp the
way it actually is, insted of making it all cluttered with these two
backslashes?

Regards
--
Lars Tobias Borsting


                 reply	other threads:[~2004-07-05 23:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=8jfhdsmj9j1.fsf@kamel.stud.ntnu.no \
    --to=larstobi@itea.ntnu.no \
    /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).