<<< Date Index >>>     <<< Thread Index >>>

Re: | characters in patterns



Hi Al, found your old failed post in archives.

 On Wednesday, September 15, 2004 at 11:23:13 AM +0100, Al S. Budden wrote:

> I've been trying to construct a save-hook that looks for the string
> "|ebay|" in the From field.
>| :save-hook "~f .*\|ebay\|.* ~h X-Email-Account: Sneakemail" =information/ebay
>| error in pattern at: ebay|.* ~h X-Email-Account: Sneakemail

    The pipe is a special char in regexps. As always in Mutt, you need
to escape them twice, because one level of escaping is removed when the
line is parsed. Also space need escaping. And there is no need to put
".*" around, it's implicit. Probably typing this could work:

| :save-hook "~f \\|ebay\\| ~h ^X-Email-Account:\\ Sneakemail" =information/ebay


Bye!    Alain.
-- 
Microsoft Outlook Express users concerned about readability: For much
better viewing quotes in your messages, check the little freeware
program OE-QuoteFix by Dominik Jain on <URL:http://flash.to/oblivion/>.
It'll change your life. :-) Now exists also for Outlook.