Forum: CFEngine Help
Subject: Re: How to remove a string from an slist based off of a class.
Author: Beto
Link to topic: https://cfengine.com/forum/read.php?3,23646,23654#msg-23654
Why do you want a new function when this is exactly what grep does? As neal
said , you need to use a negative lokahead:
vars:
"test_list" slist => {"one", "two", "three" };
linux::
"linux_slist" slist => grep("^((?!two).)*","test_list");
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine