Re: regex 101 misunderstanding
On 2004-11-21, Patrick Shanahan <wideglide@xxxxxxxxxxxxx> wrote:
> * Jim <jimo@xxxxxxxxxx> [11-21-04 00:21]:
> > I can't seem to get Mutt to limit mails displayed to just those with
> > "jimo+blah" in a Received header. I've tried variations on the
> > following, with result "No messages matched criteria.":
> >
> > Limit to messages matching:
> > ~h received.*jimo\+
> > ~h received.*jimo+
> > ~h "received.*jimo\+"
> > ~h received.*jimo\+blah
> > ~h "received.*jimo\+blah"
> > ~h "received.*jimo +"
> > ~h "received.*jimo \+"
> > ~h "received.*jimo +blah"
> >
> > I've tried single quotes in place of the double quotes, tried a colon
> > after the "received" and maybe a hundred other things.
>
> Well, it does work. Is 'Received:' really the header line you wish to
> use or is 'From:'? Note: the regex *is* case sensitive. 'rec' will
> not match 'Rec'.
No, the regular expression is _not_ case sensitive unless the
pattern contains at least one upper case letter. See the manual,
section 4.1 Regular Expressions.
As for escaping the '+', try this:
~h "received.*jimo\\+"
That's just a hunch based on my experience of having to escape a '['
that way.
HTH,
Gary
--
Gary Johnson | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA