Chapter 45: CLI Overview
STANDARD Revision 1.0
C4® CMTS Release 8.3 User Guide
© 2016 ARRIS Enterprises LLC. All Rights Reserved.
1118
character, following a possible caret. To include a literal hyphen (-), make it the first or last character. A backslash "\"
followed by a single character, includes that character, however, backslashes are not necessary for most special characters,
as inside a range, only the "]", "-", and "\" characters are treated specially.
The bracket [ ] characters allow for the definitions of a set of characters to be matched. The brackets also mean the
contents will be taken as a single character.
For example, the following expression matches with a, e, i, o, u:
[aeiou]
Use the hyphen (-) character inside the square brackets to mean all the characters from the character preceding the
hyphen to the character following it. For example, [0-9] is the same as [0123456789]. Also, [a-f] is the same as [abcdef].
The following matches a hexadecimal digit: [0-9a-f].
Note: When using the hyphen (-), do not mix types. Examples of bad ranges include: [7-k], [&-%], [D-e]. The [D-e] is
equivalent to [D-Za-e] which is equivalent to [a-z] because the CLI is case insensitive.
Multiple-Character Patterns
Regular expressions can also specify patterns containing multiple characters. You create multiple-character expressions by
joining letters, digits, or keyboard characters that do not have special meaning.
Order is important in multiple-character patterns. The expression m5& matches the character m followed by a 5 followed
by a & sign. If the string does not have m5&, in that order, the pattern matching fails. The multiple-character expression a.
uses the special meaning of the period character to match the letter a followed by any single character. With this example,
the strings ab, a!, or a2 are all valid matches for the expression.
Wildcard Searches
To emulate a wildcard search, the expression must match any character.
For this, regular expressions use the period (.) character. For example, the following regular expression matches ARRIS
followed by any single character:
ARRIS.
The asterisk (*) in the wildcard search can match with no characters or any number of characters. For example, the
following regular expression does exactly the same as the wildcard pattern above: