HP 3PAR InForm OS 3.1.1 Command Line Interface Reference

NOTE: Brackets ([ ]) are significant in Tcl and must be escaped using a backslash (\) or enclosed
in braces ({ }). Other characters such as star (*) are significant in most shells and must be escaped
or quoted if running CLI commands from the shell.
Patterns as Regular Expressions
Patterns are specified as regular expressions. The clihelp sub regexpat command describes
regular expressions in further detail:
sub,regexpat - Using regular expression (regex) pattern matching
Regular expression patterns are used to match against strings. In the CLI the strings are usually
descriptive text such as help text or event message strings. See the Tcl re_syntax documentation
for detailed help; this help text is only a summary.
Regular expressions are one or more branches separated by |, matching any string that matches
any of the branches.
A branch is zero or more quantified atoms concatenated, and it matches a match for the first
quantified atom, followed by a match of the second quantified atom and so on. An empty branch
matches an empty string.
A quantified atom is an atom followed by an optional quantifier.
Quantifiers are:
* 0 or more matches of the atom
+ 1 or more matches of the atom
? exactly one match of the atom
{m} exactly m matches of the atom
{m,} m or more matches of the atom
{m,n} m through n (inclusive) matches of the atom
*? +? ?? {m}? {m,}? {m,n}?
Match the same possibilities as above but prefer the smallest number instead of the largest
number of matches.
m and n are unsigned decimal integers from 0 through 255 inclusive.
Atoms are:
(re) Where re is any regexp, matches a match for re
() Matches an empty string
[chars] A bracket expression, usually matches a single character
in the list, or if the list begins with ^ matches a single
character not in the list. The chars may be a range specified,
for example, as a-z, or 0-9.
See detailed Tcl re_syntax help on bracket expressions.
. Matches any single character.
\k Matches the non-alphanumeric character k.
\c If c is alphanumeric, matches an escape (see Tcl re_syntax help)
{ When followed by a character other than a digit, matches {,
otherwise it is a quantifier as described above.
x Without any other significance, matches the character x.
Note that [ and ] are significant in Tcl and must be escaped using \ or enclosed in {}. Other
characters, such as *, are significant in most shells and must be escaped or quoted if running CLI
commands from another shell.
Patterns as Regular Expressions 17