beautypg.com

Regular expression matching, Standard regular expression characters, Regular expression matching 412 – Nortel Networks WEB OS 212777 User Manual

Page 412: Standard regular expression characters 412, Table 15-1, Standard regular expression special characters 412

background image

Web OS 10.0 Application Guide

412

n

Chapter 15: Content Intelligent Switching

212777-A, February 2002

Regular Expression Matching

Regular expressions are used to describe patterns for string matching. They enable you to
match the exact string, such as URLs, host names, or IP addresses. It is a powerful and effec-
tive way to express complex rules for Layer 7 string matching. Both Layer 7 HTTP SLB and
Web Cache Redirection can use regular expressions as a resource. Configuring for regular
expressions can enhance content-based switching in the following areas:

n

HTTP header matching

n

URL matching

Standard Regular Expression Characters

The following is a list of standard regular expression special characters that are supported in
Web OS:

Use the following rules to describe patterns for string matching:

n

Supports one layer of parenthesis.

n

Supports only single “$” (match at end of line) which must appear at the end of the string.
For example, “abc$*def” is not supported.

n

Size of the user input string must be 40 characters or less.

Table 15-1 Standard Regular Expression Special Characters

Construction

Description

*

Matches any string of zero or more characters

.

Matches any single character

+

Matches one or more occurrences of the pattern it follows

?

Matches zero or one occurrences of its followed pattern

$

Matches the end of a line

\

Escape the following special character

[abc]

Matches any of the single character inside the bracket

[^abc]

Matches any single character except those inside the bracket