On Fri, May 13, 2011 at 08:32:05AM -0400, Mikhail Gusarov wrote:
>On 05/06/2011 04:33 PM, [email protected] wrote:
>
>> BTW, I think the fact that a "." now matches ANY character rather than any
>> character except a newline needs to described in the reference manual.
>
>I have clarified this in reference manual, and updated example and
>comment for readtcp function as well.
This may be a more general PCRE question, but is it possible to include
"modifers" in the regexes?
For example, let's say that I want to set a class if the string
"cfengine" appears in a file, but I don't care about case sensitivity.
classes:
'good_file' expression => regline('^.*cfengine.*', ${testfile});
I could write out all 265 permutations of "cfengine"
capitialization ("cfengine", "Cfengine", "cFengine", "CFengine", etc),
but that's pretty inefficient.
I could also write '^.*[cC][fF][eE][nN][gG][iI][nN][eE].*', but that's
just ugly. :)
What I'd like is a simple way to add a "i" modifier to the regex so that
I can write the equivilent of:
/^.*cfengine.*/i
--
Jesse Becker
NHGRI Linux support (Digicon Contractor)
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine