Documentation forKiwi CatTools

Ignore Text

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 are classed as ignored lines. Ignored lines are still highlighted in the diff report, but they are not flagged as changes/differences. No trigger alert emails are sent.

The Ignore text syntax is made up of two parts:

  1. The first part is an instruction which defines the context of the ignore text.
    • ^: ignore lines with the sample text occurring anywhere in them.
    • <: ignore lines that begin with the sample text.
    • >: ignore lines that end with the sample text.
  2. The second part is a block of sample text which is searched for when the line comparison is being made.

The following is an example of how this feature might be used:

  • ^Time: ignores any lines with the text Time in them.
  • <Time: ignores any lines which begin with the word Time.
  • >Time: ignores any lines which end with the word Time.

Examples

  • ^! Last configuration change at

    Ignore only lines that contain the text Last configuration change at.

  • <Current configuration

    Ignore only lines that begin with Current configuration.

  • ^! Last configuration change at|<Current configuration

    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: ^some text|^some other text|<some more text

Ignoring changes that span multiple lines:

To have a block of changes ignored, use the following ignore syntax:

{start of block text match}-{end of block text match}

In the 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.

Because the ignore text field uses the pipe, |, as a delimiter between multiple inputs, you can not use | in the regular expression syntax. For example: ^some text|{crypto block start}-{crypto block end}|<some more text

To Ignore a Block of Text from Comparison itself

To identify a block of text to be ignored fully from comparison itself, use the following syntax:

[Start of Block]-[End of Block]