Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

"Source contains" condition type:

The following examples demonstrate how the Loose, Sequential, and Strict match modes affect condition evaluation when using the Source contains condition type.

Loose mode

Example Input 1:

Code Block
languagetext
 description LAN
hostname R1

...

The same three match modes are available for the Source matches regex condition type. Each When using this condition type, each input line is treated as a separate regular expression and matched against the source. The selected match mode controls how these regex inputs are matched: whether they can match in any order, must match in the specified order, or must match consecutively.

Loose mode
Example Input 7:

Code Block
languagetext
router ospf
hostname R[0-9]+

...

The router ospf line matches the source, but hostname R[A-Z]+ regex does not match hostname R1. Because all input lines must match the source, the condition fails.

Sequential mode
Example Input 9:

Code Block
languagetext
router ospf
 network [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/([0-9]+) area [0-9]+

...

Both lines in the source, but they appear in the opposite order. Sequential mode therefore fails.

Strict mode
Example Input 11:

Code Block
languagetext
interface Loopback[0-9]+
 description Management Loopback
 ip address 10\.255\.255\.[0-9]+ 255\.255\.255\.255

...