Getting closer

    vars:
        "regex" string => join("|", "list");

    delete_lines:
        "^(?!($(regex)).*).*$"

this almost works like I want it, it makes this regex
^(?!(1|2|3).*).*$

I want it to delete any line not starting with my list elements but this
one doesn't do what I thought it would.

^(?!(1.*|2.*|3.*)).*$

-- 
Nick Anderson <n...@cmdln.org>
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to