CLI Usage
7750 SR OS Basic System Configuration Guide Page 49
A:Dut-C# admin display-config | match post-lines 5 max-count 2 expression "OSPF.*Config"
echo "OSPFv2 Configuration"
#--------------------------------------------------
ospf
timers
spf-wait 1000 1000 1000
exit
echo "OSPFv2 (Inst: 1) Configuration"
#--------------------------------------------------
ospf 1
asbr
router-id 1.0.0.1
export "testall"
Table 19 describes regular expression symbols and interpretation (similar to what is used for route
policy regexp matching). Table 20 describes special characters.
Table 19: Regular Expression Symbols
String Description
.
Matches any single character.
[ ]
Matches a single character that is contained within the brackets.
[abc] matches “a”, “b”, or “c”. [a-z] matches any lowercase letter.
[A-Z] matches any uppercase letter.
[0-9] matches any number.
[^ ]
Matches a single character that is not contained within the brackets.
[^abc] matches any character other than “a”, “b”, or “c”.
[^a-z] matches any single character that is not a lowercase letter.
^
Matches the start of the line (or any line, when applied in multiline mode)
$
Matches the end of the line (or any line, when applied in multiline mode)
()
Define a “marked subexpression”.
Every matched instance will be available to the next command as a variable.
*
A single character expression followed by “*” matches zero or more copies of the
expression.
{m,n}
Matches least m and at most n repetitions of the term
{m}
Matches exactly m repetitions of the term
{m,}
Matches m or more repetitions of the term
?
The preceding item is optional and matched at most once.
+
The preceding item is matched one or more times.
-
Used between start and end of a range.