Forum: Cfengine Help
Subject: cfengine 3.1.5 pcre question
Author: Beto
Link to topic: https://cfengine.com/forum/read.php?3,21784,21784#msg-21784

I used the expression "#.*" in the comment field of several 
readstringarry/readstringlist functions.  Prior to 3.1.5 this always worked 
without problem.  But with 3.1.5 several, but not all, of the subject functions 
returned no result.  I changed the "#.*" to "#[^\n]*" (which I noticed in some 
examples) in these functions and that eliminated the issues.

Can anyone explain why "#.*" caused problems in 3.1.5 and why changing it to 
"#[^\n]*" fixed the problems?  I thought a "." represented any character except 
a new line character and was the same thing as "[^\n]".

I'm wondering if I need to change the ".*" I use in to match strings parts in 
other functions (e.g., classmatch).  But they seem to be working Ok.

Thanks!

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

Reply via email to