Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* nnmail-split-fancy regexps confusing
@ 2004-07-05 23:53 Lars Tobias Borsting
  0 siblings, 0 replies; only message in thread
From: Lars Tobias Borsting @ 2004-07-05 23:53 UTC (permalink / 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-05 23:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-05 23:53 nnmail-split-fancy regexps confusing Lars Tobias Borsting

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).