TANDBERG D14049.01 manual RegularText goesExpressionhere Reference, About Regular Expressions

Models: D14049.01

1 187
Download 187 pages 62.39 Kb
Page 178
Image 178

RegularText goesExpressionhere Reference

TANDBERG VIDEO COMMUNICATION SERVER ADMINISTRATOR GUIDE

About 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.

This section provides a list of commonly used special characters in regular expression syntax.

Character

.

*

+

\

\d

[...]

(...)

^

Description

Matches any 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. 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 [] - 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.

Signifies the start of a line.

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 0-9plus 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.(netcom) will match against any URI for the domain example.com or the domain example.net.

For an example of regex usage, see

CPL Examples.

For a detailed description of regular expression syntax see [9].

$

(?!...)

Signifies the end of a line.

^\d\d\d$ will match any string that is exactly 3 digits long.

Negative lookahead. Defines a subexpression (?!.*@tandberg.net$).* will match any string that does not end with that must not be present in order for there to be @tandberg.net.

a match.

Introduction

Getting

System

System

H.323 & SIP

Registration

Zones and

Call

Firewall

Bandwidth

Maintenance

Appendices

Started

Overview

Configuration

Configuration

Control

Neighbors

Processing

Traversal

Control

 

 

 

D 14049.01

 

 

 

 

178

 

 

 

 

 

07.2007

 

 

 

 

 

 

 

 

 

Page 178
Image 178
TANDBERG D14049.01 manual RegularText goesExpressionhere Reference, About Regular Expressions