On Monday, 05 September 2005 at 10:51, Brendan Cully wrote: > On Monday, 05 September 2005 at 19:06, Oswald Buddenhagen wrote: > > On Mon, Sep 05, 2005 at 09:31:00AM -0700, Brendan Cully wrote: > > > This patch adds a '$' modifier to the pattern language that turns > > > regexp searches into simple string matches. > > > > > > Examples: > > > ~b mutt: client regexp match > > > > > i for one would change the ~ to = instead of prepending $ - less to type > > and more intuitive (to somebody with perl knowledge ;). > > Good idea. It gets rid of the nasty nested modifier semantics > too. Here's a patch that adds a = operator, identical to ~ but > produces a string match instead of a regexp match. It still does an > implicit string match if the regexp contains no metacharacters. I've committed this, with fallback to string match turned off. Since = is no more cumbersome than ~, I prefer having tighter user control over what search is performed. IMAP users, give =b, =B and =h a try. =h is special though: its argument should be a string consisting of a header name, colon and a substring to match (or nothing after the colon if you just want to test the presence of a header). eg =h "From: brendan" will behave like =f brendan.
Attachment:
pgpOW74YwQQ9k.pgp
Description: PGP signature