David Champion <[EMAIL PROTECTED]> wrote on Thu, 25 May 2000:
> OK. I didn't need to escape the parens at all, just the pipes. This
> expression is exactly what I'm looking for:
> ~L alice ~L bob ~L carol ^~L (alice\|bob\|carol)
I'm curious, do you really need the first part, the three matches?
The last part should do their job too. Since you tried these things,
I suppose you tested it without them too...
> (I was hoping that the parser would change the meaning of '|' inside
> parens -- I didn't think of "\|" because I wasn't looking for a literal
> pipe.)
Well, it does, but it parses from "top down" -- it takes the whole
string first, and then splits it up to expressions. | can be "or",
so it splits it at that. It doesn't look at the context.
You can avoid it by quoting it, like you did, or by giving the pattern
in quotes: "^~L (alice|bob|carol)" (or something like that).
> Now, suppose I'm Alice. I'd like to be able to remove the "alice"
> parts of that and let $alternates cover it, but I don't see any way to
> do that. Is there some way to get $alternates into the expression?
I don't think there's any way to expands a random Mutt variable in these
situations, only the %-expandos...
> Should there be? I'm happy with a "yes" to either question. :)
That's a "no" and a "maybe"... Sorry, no "yes". :-)
Mikko
--
// Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/
// The Corrs list maintainer // net.freak // DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
It *is* as bad as you think, and they *are* out to get you.