Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

Using Regex in Compliance Checks (RME)

Hi,

It seems that a legitimate Regex statement is not working in performing a compliance check in RME.

E.g.

The below line exists in the device config

+++++++++++++++++++

logging buffered 100000 informational

+++++++++++++++++++

When using regex to match this in compliance

OK --> + [#logging buffered .*#]

OK --> + [#logging buffered .* informational|debugging#]

Not OK --> + [#logging buffered .* debugging|informational#]

Not OK --> + [#logging buffered .* (debugging|informational)#]

So it seems that it doesn't like the OR operator in Regex, even though it is a supported operator in Java 1.4.2 Regex (which should be supported as per the documentation)

Thanks \\ Naman

2 REPLIES
Cisco Employee

Re: Using Regex in Compliance Checks (RME)

The regexp "logging buffered .* debugging|informational" should not work. However, "logging buffered .* (debugging|informational)" does work just fine. Maybe you had a typo.

Community Member

Re: Using Regex in Compliance Checks (RME)

you are right...!

I did have a typo and had a 'space' between '.*' and '(...'.

Thanks for pointing in the right direction..

\\ Naman

172
Views
3
Helpful
2
Replies
CreatePlease to create content