[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Editfiles, DeleteCommands, POSIX Syntax, etc
From: |
Andrew Stribblehill |
Subject: |
Re: Editfiles, DeleteCommands, POSIX Syntax, etc |
Date: |
Thu, 10 Apr 2003 09:29:12 +0100 |
User-agent: |
Mutt/1.5.4i |
Quoting Brian E. Seppanen <seppy@chartermi.net> (2003-04-09 08:39:29 BST):
> Hello:
>
> I'm desperate to use editfiles for some ACL maintanence, and to do so I
> need to insure that I can clear a couple of lines with the DeleteCommands,
> unfortunately I cannot, for the life of me, define a regex or pattern that
> will match, and I'm frankly baffled. I need to match
>
> only_from += 192.168.0.0/24
>
> In all cases I've been careful to escape the + and the .'s I've had luck
> with a BeginGroupIfNoMatch, so I'm pretty sure, I haven't missed escaping
> something.
Cfengine uses regular expressions in a 'tied' manner i.e. the whole
line must match the regular expression. So, try this:
DeleteLinesMatching '^only_from +\+= 129\.168\.0\.0/24$'
The ^ and $ are optional but I like them there to remind me what's
going on.
--
FAEROES
SOUTHEAST 5 OR 6 BECOMING VARIABLE 3 OR 4. OCCASIONAL RAIN.
MODERATE OR GOOD