Control Compliance Suite - using Regular Expression Options.

book

Article ID: 181673

calendar_today

Updated On:

Products

Control Compliance Suite Unix Control Compliance Suite Windows

Issue/Introduction

 

Resolution

Within CCS, each line of a text file is evaluated separately for the RegEx defined in a CCS check. This means that although "m" (use multi-line mode), "n" (do not capture unnamed groups) and  "s" (use single line mode) are valid options, they are not effective within CCS.

The below RegEx Options are valid input however potentially not effective during check-evaluation for Pattern Match and Contains Match operators within CCS.

Inline Character Effect
i Use case-insensitive matching
m  Use multi-line mode
n  Do not capture unnamed groups
s  Use single-line mode
x  Exclude un-escaped white space from the pattern
c  Respect Case i.e. don’t ignore case (default)

 

During CCS check creation, to use RegEx options, RegEx should be covered with back-slashes (/) and then options can be provided.  

For example:

 /^(root|system|computer)/insx

 

Note: The regular expression options used by CCS are derived from the Microsoft .Net framework v4.0. For more information on each of the options, please go to:http://msdn.microsoft.com/en-us/library/yd1hzczs(v=vs.100).aspx