beautypg.com

Ordinary characters, Collating elements, Ordinary characters collating elements – Visara Master Console Center Scripting Guide User Manual

Page 65: Table 12. regular expressions, special characters

background image

Chapter 4 Regular Expressions

Scripting Guide

65

Character Description

the quantity.

|

OR. "A|B" matches either "A" or "B". OR is very powerful

when combined with subexpressions.
The vertical line is a special character. It is not valid to use a
vertical line:

-

First or last in an RE.

-

Immediately following another vertical line.

-

Immediately following a left parenthesis.

-

Immediately preceding a right parenthesis

.

Table 12. Regular Expressions, Special Characters

1

Outside of a bracket expression, it is not valid to use the ‘*’, ‘+’,

‘?’, or ‘{‘:

ƒ

As the first character in an RE.

ƒ

Immediately following a vertical line.

ƒ

Immediately following a circumflex.

ƒ

Immediately following a left parenthesis.

Ordinary Characters

Any character, except for RE special characters (such as the period,
question mark, or asterisk), is an ordinary character and is an RE that
matches itself.

Collating Elements

The concept of a character is generalized to the concept of a collating
element. For many purposes, especially in English-speaking locales, the
term “collating element” may be considered synonymous with “character”.
In REs, collating elements are relevant to bracket expressions. For more
information about bracket expressions, see Bracket Expressions on page
54.
A collating element is the smallest unit used to determine how to order
characters. Collating elements are necessary for languages that treat
some strings as individual collating elements. For example, in Spanish,
the strings “ch” and “ll” each are collating symbols (that is, the Spanish
primary sort order is a, b, c, ch, d,...,k, l, ll, m,...) and are considered one
character.