...
This verifies that the device follows the R<number> hostname convention and has OSPF enabled. The two matches are independent, so their order does not matter.
Example Input 8:
| Code Block | ||
|---|---|---|
| ||
router ospf
hostname R[A-Z]+ |
Result: Condition failed
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 | ||
|---|---|---|
| ||
router ospf network [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/([0-9]+) area [0-9]+ |
...
This verifies that an OSPF network statement appears after the "router ospf" command. Other matching lines may appear between the two lines.
Strict mode
Example Input 9:
| Code Block | ||
|---|---|---|
| ||
interface Loopback[0-9]+ description Management Loopback ip address 10\.255\.255\.[0-9]+ 255\.255\.255\.255 |
...