Regular Expression Reference; Overview; Common Regular Expressions - TANDBERG Video Communication Server Administrator's Manual

Table of Contents

Advertisement

Grey Headline (continued)

Regular expression reference

Overview

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 opposite 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
Mastering Regular Expressions
[9].
For an example of regular expression
usage, see the section
CPL
examples.
Overview and
Introduction
Getting started
status
D14049.05
February 2009
Character
Description
.
Matches any single character.
*
Matches 0 or more repetitions of the previous match.
+
Matches 1 or more repetitions of the previous match.
\
Escapes a regular expression special character.
\d
Matches any decimal digit, i.e. 0-9.
[...]
Matches a set of 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 can not use special characters within the
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.
^
Signifies the start of a line.
When used immediately after an opening brace, negates
the character set inside the brace.
$
Signifies the end of a line.
(?!...)
Negative lookahead. Defines a subexpression that
be present in order for there to be a match.
not
System
VCS
Zones and
configuration
configuration
neighbors

Common regular expressions

Example
.*
will match against any sequence of characters.
[a-z]
will match against any lower case alphabetical character.
[a-zA-Z]
will match against any alphabetical character.
[0-9#*]
will match against any single E.164 character - the E.164 character
set is made up of the digits
[]
- they
(*).
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
john _ smith@example.com
the user
would transform it to js@example.com.
.*@example.(net|com)
example.com
[^abc]
matches any single character that is NOT one of a,
^\d\d\d$
will match any string that is exactly 3 digits long.
(?!.*@tandberg.net$).*
must
tandberg.net.
Call
Bandwidth
processing
control
182
TANDBERG
VIDEO COMMUNICATIONS SERVER
0-9
plus the hash key (#) and the asterisk key
(.).* _ (.).*(@example.com)
would match against
and with a replace string of
will match against any URI for the domain
or the domain example.net.
will match any string that does not end with
Firewall
Applications
Maintenance
traversal
ADMINISTRATOR GUIDE
\1\2\3
b
or c.
@
Appendices

Advertisement

Table of Contents
loading

Table of Contents