
Chapter 1
Using the CLI String Search
Multiple-Character Patterns
When creating regular expressions, you can also specify a pattern containing multiple characters. You create
With
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 regular expression.
You can remove the special meaning of the period character by putting a backslash in front of it. In the following expression
a\.
only the string a. matches this regular expression.
You can create a
telebit 3107 v32bis
Multipliers
You can create more complex regular expressions to match multiple occurrences of a specified regular expression by using some special characters with your single- and
Table
Character | Description |
*Matches 0 or more single- or
+Matches 1 or more single- or
?Matches 0 or 1 occurrences of the single- or
This example matches any number of occurrences of the letter a, including none:
a*
This pattern requires that at least one letter a in the string is matched:
a+
This pattern matches the string bb or bab:
ba?b
This string matches any number of asterisks (*):
\**
Catalyst 6500 Series Switch SSL Services Module Command Reference
|
| ||
|
|