Regular Expressions - Cisco TelePresence Administrator's Manual

Video communication server
Hide thumbs Also See for TelePresence:
Table of Contents

Advertisement

Reference material

Regular expressions

Regular expressions can be used in conjunction with a number of VCS features such as alias
transformations, zone transformations, CPL policy and ENUM. The VCS uses POSIX format regular
expression syntax. The table below provides a list of commonly used special characters in regular
expression syntax. This is only a subset of the full range of expressions available. For a detailed description
of regular expression syntax see the publication Regular Expression Pocket Reference.
Character Description
.
Matches any single character.
\d
Matches any decimal digit, i.e. 0-9.
*
Matches 0 or more repetitions of the
previous character or expression.
+
Matches 1 or more repetitions of the
previous character or expression.
?
Matches 0 or 1 repetitions of the previous
character or expression.
{n}
Matches n repetitions of the previous
character or expression
{n,m}
Matches n to m repetitions of the previous
character or expression
[...]
Matches a set of specified characters.
Each character in the set can be specified
individually, or a range can be specified by
giving the first character in the range
followed by the - character and then the
last character in the range.
You cannot use special characters within
the [] - they will be taken literally.
[^...]
Matches anything except the set of
specified characters. Each character in the
set can be specified individually, or a
range can be specified by giving the first
character in the range followed by the -
character and then the last character in the
range.
You cannot use special characters within
the [] - they will be taken literally.
(...)
Groups a set of matching characters
together. Groups can then be referenced in
order using the characters \1, \2, etc. as part
of a replace string.
|
Matches against one expression or an
alternate expression.
Cisco VCS Administrator Guide (X8.1.1)
Example
.* matches against any sequence of characters
9?123 matches against 9123 and 123
\d{3} matches 3 digits
\d{3,5} matches 3, 4 or 5 digits
[a-z] matches any alphabetical character
[0-9#*] matches against any single E.164 character
- the E.164 character set is made up of the digits 0-9
plus the hash key (#) and the asterisk key (*)
[^a-z] matches any non-alphabetical character
[^0-9#*] matches anything other than the digits 0-9,
the hash key (#) and the asterisk key (*)
A regular expression can be constructed to transform a
URI containing a user's full name to a URI based on
their initials. The regular expression (.).*_(.).*
(@example.com) would match against the user john_
smith@example.com and with a replace string of
\1\2\3 would transform it to js@example.com
.*@example.(net|com) matches against any URI for
the domain example.com or the domain example.net
Regular expressions
Page 400 of 507

Advertisement

Table of Contents
loading

This manual is also suitable for:

Telepresence x8.1.1

Table of Contents