[Gllug] regexp searches in mutt

Jim Bailey jim at freesolutions.net
Fri Sep 27 20:35:39 UTC 2002


On Fri, Sep 27, 2002 at 08:29:27PM +0100, Stig Brautaset wrote:
> 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! 
>
It does indeed, thanks Stig and others I should of remembered about
square brackets needing to be escaped.

Peace Jim

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list