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 <[email protected]>
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to