[Gllug] regexp searches in mutt
Stig Brautaset
stigbrau at start.no
Fri Sep 27 19:29:27 UTC 2002
On Sep 27 2002, Jim was overheard saying:
> Hi all,
>
> Could some one tell me what I am doing wrong here please?
>
> I am trying to tag messages in mutt using shift t and then a regexp say
> for gllug, [gllug]* which I believe should tag all messages starting
> with [gllug]. However it tags a load of stuff it shouldn't, my skill at
> regexp is less than optimal could some offer advice as to where I am
> going wrong please.
If you use "[gllug]*" you specify that you want to match any of the
characters g, l, u, zero or more times (afaics). If you want to match
subjects that starts with the string [gllug], then you need to escape
the '[' and ']', and specify that it's supposed to be at the start:
^\[gllug\]
Also note that mutt's case matching is 'strange'. A lower case letter
matches both lower and upper case, but an upper case letter matches only
other upper case letters (by default at least, it's probably
configurable -- your queue Bruce ;)). Note that you need no star, if
all you want is to match subjects beginning with [gllug]. This however
allows a match for a subject containing _only_ [gllug], so if you want
to avoid that, then use something like
^\[gllug\].*
Hope that helps!
Stig
--
brautaset.org
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list