David Thorburn-Gundlach wrote:
> I have read the manual, particularly sections 4.1 and 4.2, but still
> have a few questions about limiting and regular expressions.
I guess, I know why...
> I have found that I can "l funnies|neff" quite happily, but I cannot
> "l ~h funnies|neff" 'cuz I get an error in the pattern.
Didn't I say, I know why? :-)
There is something missing in the documentation regarding regexps in
use with patterns.
> I've tried many variants of parenthesizing and escaping, but nothing
> seems to work. Can I really do that, as implied by the "~h EXPR" in
> the manual, or not?
Yes, you can. The solution is quite easy, but I also needed a few
hours until I figured out what went wrong. Escape-Sequences do not not
work anyway. The only solution is to include the regexp in single
quotes and the pattern in double quotes or vice versa. E.g. in this
case it weould be:
"~h 'EXPR'"
The reason is that mutt parses the pipes ("|") in the regexp as OR
operator on patterns as described at the end of section 4.2 of the
manual (I use manual for mutt version 0.95.1). The only way to tell
mutt that those pipes are for the regexp and not for the patterns is
to include the whole regexp in quotes so that it's treated as one
argument. This should be mentioned as well in section 4.1 as in 4.2,
but you won't find it anywhere at the moment. So it's just a bug in
the manual... (Which should be fixed IMHO.)
> Can I search for a real expression in the subject line, or am I
> limited to a simple string, as implied by "~s SUBJECT" in the manual?
You can. e.g. I use
color index green default "~s ^wer-weiss-was:"
The intention is that replies on of these mails should not be
green, but other should. :-)
> How would I make a case-sensitive search for an all lower-case string?
> That is, I want to find funny and funnies but *not* Funny...
This seems to be dependend on the mutt version because of the change
from the buggy GNU rx libs to regex. I noticed once, that matching
against headers, which contain e-mail-addresses was case-insensitive
but matching against other headers was case-sensitive. But maybe that
was just my fantasy... ;-)
HTH
Regards, Axel
--
Axel Beckert - [EMAIL PROTECTED] - http://w5.cs.uni-sb.de/~abe/
Dept. of Computer Science, University of Saarland (Germany)
Artificial Intelligence Laboratory (AI Lab), Prof. Dr. W. Wahlster;
WWW-Administrator IBFI Schloss Dagstuhl; Students Representative