[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LocateLineMatching madness
From: |
Jamie Wilkinson |
Subject: |
Re: LocateLineMatching madness |
Date: |
Wed, 5 May 2004 22:08:08 +1000 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
This one time, at band camp, Oyvind Gronnesby wrote:
> BeginGroupIfNoLineMatching "^URI ldap://localhost/"
> LocateLineMatching "URI"
> ReplaceLineWith "URI ldap://localhost/"
> EndGroup
>#URI ldap://ldap.example.com ldap://ldap-master.example.com:666
>Edit: Search for URI failed. Current line still 1
The LocateLineMatching will look for a line that matches, not a
substring in a line. You want
LocateLineMatching '.*URI.*'
Also, you'll need to ResetSearch in between your BeginGroup... blocks,
otherwsie the second LocateLineMatching will fail, given the order of
the lines in your config file.
--
jaq@spacepants.org http://spacepants.org/jaq.gpg