Meta Characters In The Regular Expressions - Siemens SINUMERIK 840D sl Operating Manual

Integrate create myconfig - diff, expert, topo
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Create MyConfig - Diff
3.8 Use of regular expressions in Diff
Escape sequence
If a meta character is required as literal character to formulate a regular expression, i.e. it must
only stand for itself, then the character must be masked with what is called an escape
sequence. This is achieved by prefixing a backslash "\".
Example
A regular expression should identify an open square bracket "[".
A square bracket must be prefixed with a backslash "\". Because a single square bracket is a
meta character, i.e. has a special function, see character classes.
In this case, "\[" must be written in the regular expression.
3.8.2

Meta characters in the regular expressions

The most important meta characters are shown in the following subsections which are
contained in the dialect of the regular expressions of Create MyConfig.
Character classes
In a regular expression, a character class defines
characters contained in the character class.
Meta charac‐
ters
[0-9a-fAF]
116
Corresponds to any character with the exception of \n (line break).
.
A character set available for selection can be defined using square brackets. The
[ ]
expression in the square brackets precisely stands for one character from this selec‐
tion.
Corresponds to
[acdb]
string. This means one a, one b, one c or one d. The sequence of the characters
within the character class is of no significance.
Corresponds to any, individual character which is
[^acdb]
acter string. If a ^ is not located at the beginning of the definition, then it should be
considered as literal.
For "character negation" the ^ can only be located
here, in turn, may only be used at the
Outside a square bracket, ^ has a different meaning, see below: "Constructs".
Adjacent characters can be specified as a range by using a hyphen.
If the hyphen is written at the beginning or at the end of the character class or with
backslash, i.e. \- then it stands for itself and is not valid as specifying a range.
A character which is a letter, a number or an underscore.
\w
A character which is neither a letter, number nor underscore.
\W
Corresponds to any space character, i.e. space character, tabulator, line feed spec‐
\s
trum.
Corresponds to any non-space characters.
\S
Corresponds to any decimal number, corresponds to [0-9].
\d
Corresponds to any non number, corresponds to [^0-9].
\D
Corresponds to a tab stop character.
\t
one character, which may be one of the
Description
one single character which is contained in the specified character
beginning !
SINUMERIK Integrate Create MyConfig - Diff, Expert, Topo
not contained in the specified char‐
within the square brackets and
Operating Manual, 12/2017, A5E36537479B-AE

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828d

Table of Contents