...
| Code Block | ||
|---|---|---|
| ||
(?m)^hostname R[0-9]+$ (?m)^interface Ethernet[0-9]+$^router ospf$ |
This checks for a hostname matching R followed by one or more digits and an Ethernet interface with a numeric identifierospf protocol enabled. The two matches can occur anywhere in the configuration and in any order.
...