|
Ignore Text |
Top Previous Next |
|
When comparing files using either the Report.Compare.Two files or Report.Compare.Running Startup activities you are provided with the option to supply ignore text.
Lines that match the ignore text instruction will be classed as ignored lines. Ignored lines are still highlighted in the diff report but they are not flagged as changes / differences and so will not trigger alert emails to be sent.
The Ignore text syntax is made up of two parts.
^ is the instruction to ignore lines with the sample text occurring anywhere in them < is the instruction to ignore lines that begin with the sample text > is the instruction to ignore lines that end with the sample text
The following is an example of how this feature might be used:
^Time Will ignore any lines with the text "Time" in them <Time Will ignore any lines which begin with the word "Time" >Time Will ignore any lines which end with the word "Time"
Examples:
^! Last configuration change at This will ignore only lines that contain the text "Last configuration change at"
<Current configuration This will ignore only lines that begin with "Current configuration"
^! Last configuration change at|<Current configuration This will ignore lines that contain the text "Last configuration change at" as well as lines that begin with "Current configuration"
Multiple ignore text instructions may be concatenated by using the | (pipe) symbol.
E.g. ^some text|^some other text|<some more text
Ignoring changes that span multiple lines:
To have a block of changes ignored, you can use the following ignore syntax...
{start of block text match}-{end of block text match}
In our example below, the running-config contains a code block that is missing from the startup config.
Cisco Running-Config: ! crypto ca certificate chain TP-self-signed-12345678 certificate self-signed 01 3082022B 30820194 A0030201 02020101 300D0609 2A864886 F70D0101 04050030 4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D31 37363538 528BD5A8 E7E26C51 10BAB609 5B60228F C8DE0299 7BE85C2D 9769FF05 C295706F 3082022B 30820194 A0030201 02020101 300D0609 2A864886 F70D0101 04050030 4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D31 37363538 528BD5A8 E7E26C51 10BAB609 5B60228F C8DE0299 7BE85C2D 9769FF05 C295706F 3082022B 30820194 A0030201 02020101 300D0609 2A864886 F70D0101 04050030 4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D31 37363538 528BD5A8 E7E26C51 10BAB609 5B60228F C8DE0299 7BE85C2D 9769FF05 C295706F quit Username joe password bloggs !
Cisco Startup-Config: ! crypto ca certificate chain TP-self-signed-12345678 certificate self-signed 01 nvram:IOS-Self-Sig#4567.cer Username joe password bloggs !
To ignore this entire block of changes, you could use the following ignore text:
{certificate self-signed 01$}-{quit}|^certificate self-signed
This matches "certificate self-signed 01" at the top and ignores all changes until it matches the "quit" at the end of the block.
The text contained between the {}-{} uses the Regular Expression syntax. So in our example, the $ means match the end of the line.
Note: Because the ignore text field uses | (pipe) as a delimiter between multiple inputs, you can not use the | (pipe) in the regular expression syntax.
E.g. ^some text|{crypto block start}-{crypto block end}|<some more text
|