Forum: Cfengine Help
Subject: Re: regex help
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,21705,21764#msg-21764

Sauer,

Are you suggesting that the regex be this:

(\S+\s+){5}(?<!00 3 1 \* 
\*)\s*/usr/scripts/util/distributed-multipath-ck\.sh\s*(?!2>&1 > /dev/null).*


If I understand this correctly then the look arounds need a contingency match 
in this case the leading \S+\s+ and the trailing .*.  But those are also 
greedy. Such that the above regex will also match the original good line that 
I'm trying to exclude:

00 3 1 * * /usr/scripts/util/distributed-multipath-ck.sh 2>&1 > /dev/null


_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to