Quantcast
Viewing all articles
Browse latest Browse all 21093

Matchig a chunk of plain text in the compliance policy reporting

I am encouraging the layer2 and layer3 engineers to make use of the policy reporting engine. They don't want to learn the complexity of regular expressions. instead they need a easy recipe to finding chunks of text in a configuration file, e.g. the red chunk of text inside the protocols configuration block.

 

protocols {

...

  mvrp {

        add-attribute-length-in-pdu;

        interface xe-0/1/2.0;

        interface xe-1/1/2.0;

    }

...

}

(note: leading/trailing white space is not syntactically significant)

 

they're okay at restricting the search to the "protocols {" ... "}" configuration block, but then when searching for the chunk of text they copy&paste the block of text in and use string matching, which doesn't do what they expect (and a lack of debugging for this doesn't help me figure out what is missing). Asking them to convert this into a safe regular expression is hard.

 

Suggestions on how to do this kind of matching welcomed...


Viewing all articles
Browse latest Browse all 21093

Trending Articles