cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
900
Views
3
Helpful
2
Replies

Using Regex in Compliance Checks (RME)

mnlatif
Level 3
Level 3

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 2

Joe Clarke
Cisco Employee
Cisco Employee

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

you are right...!

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

Thanks for pointing in the right direction..

\\ Naman

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: