Page tree

Versions Compared

Key

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

...

This verifies that an OSPF network statement appears after the "router ospf" command. Other matching lines may appear between the two lines.

Example Input 10:

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

Result: Condition failed

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

...

This verifies that a Loopback interface with a variable interface number has the required "Management Loopback" description and uses a /32 address from the 10.255.255.0/24 management subnet.

Example Input 12:

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

Result: Condition failed

Both lines match in the source, but the description Management Loopback line appears between them. Strict mode requires the matching lines to be consecutive, so the condition fails.

Choosing the right Match mode

...