I'm trying to do the following in a NCM policy rule:
Config File must contain:
username alice
OR
username bob
AND
Config File must NOT contain:
username [anything except alice OR bob]
I tried to use a regex negative lookahead to make this work:
Config File must contain RegEx expression ^username (alice|bob)\s
and Config File must not contain RegEx expression ^username (?!(alice|bob))\s
but it doesn't. It matches the first part fine, but it doesn't alert if I have "username test" in the config.
Help?