I just downloaded your test code and found that your code was simply
incorrect. You have this:
editfiles:
{ /home/skaven/tmp/jo/testfile
DeleteLinesMatching "^0^I^I1"
}
I got this to work fine by replacing it with this:
any::
# Using "real" tabs (not ^I)
{ /home/skaven/tmp/jo/testfile
DeleteLinesMatching "^0 1.*"
}
Or even this:
any::
# Using ${tab} macro
{ /home/skaven/tmp/jo/testfile
DeleteLinesMatching "^0${tab}${tab}1.*"
}
Note that in both cases, all that is needed is the trailing ".*" to make
the regex work.
So I have to agree with the others on this thread -- this isn't a bug --
you are just not using a full-line regex, or perhaps you've gotten
yourself confused with :set list versus what's actually in your code.
Paul Krizak 7171 Southwest Pkwy MS B400.2A
Advanced Micro Devices Austin, TX 78735
Linux/Unix Systems Engineering Desk: (512) 602-8775
Silicon Design Division Cell: (512) 791-0686
Jo Rhett wrote:
> Mark Burgess wrote:
>> Jo, please use the tool provided. There is nothing wrong with these
>> posix standard routines. You might be writing perl regexs or regexs
>> from other non-posix libraries by mistake.
>
> Attach is both the testfile and the cfagent.conf which demonstrates the
> problem. You can test it yourself.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Bug-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/bug-cfengine
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine