Technical data

8. Documentation for Developers
an empty pair of brackets stands for an “empty” expression
an expression in square brackets “[ ]” (see below)
a dot .”, matching an arbitrary character, for example a .+” matches any string con-
taining at least one char
a “ˆ represents the beginning of a line, for example a “ˆ a.*” matches a string beginning
with an “a” followed by any char like in “a” or “adkadhashdkash”
a “$” represents the end of a line
a followed by one of the special characters ˆ . [ $ ( ) * + ? { stands for the second
char without its special meaning
a normal char matches exactly this char, for example “a” matches exactly an “a”.
An expression in square brackets indicates the following:
“x-y” matches any char inbetween “x” and “y”, for example “[0-9]” matches all chars
between “0” and “9”; “[a-zA-Z]” symbolizes all chars, either upper- or lowercase.
“ˆ x-y” matches any char not contained in the given interval, for example “[ˆ 0-9]”
matches all chars except for digits.
“[:character-class:]” matches a char from character-class. Relevant standard character
classes are: alnum, alpha, blank, digit, lower, print, punct, space, upper and xdigit.
I.e. “[ [:alpha:] ]” stands for all upper- or lowercase chars and hence is identical with
“[ [:lower:] [:upper:] ]”.
Examples for regular Expressions
Let’s have a look at some examples!
NUMERIC: A numeric value consists of at least one, but otherwise any number of digits. “At
least one” is expressed with a “+”, one digit was already in an example above. So this results
in:
NUMERIC = '[0-9]+'
or alternatively
NUMERIC = '[[:digit:]]+'
NOBLANK: A value that does not contain spaces, is any char (except for the char “space”) and
any number of them:
NOBLANK = '[^ ]*'
or, if the value is not allowed to be empty:
NOBLANK = '[^ ]+'
297