Stringmatch; Stringpos - Siemens SINUMERIK 840D sl Operating Manual

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

Advertisement

4.6.8.2

StringMatch

StringMatch("<string>", "<search>")
The StringMatch() function searches in the <string> character string for the <search>
search pattern.
Regular expressions are used as search pattern. The return value of the function is a character
string.
Note
Compatibility
The function name has been changed from Match() to StringMatch().
For compatibility reasons, the Match() function name is still tolerated in this CMC version.
Match() will no longer be supported in subsequent CMC versions.
Only use the StringMatch() function. Change all earlier calls to this new function name.
Example
Up.NCU = StringMatch("NCU720.3 PN", "NCU([0-9]+)")
Up.NCU = StringMatch(Up.$Env.NCU, "NCU([0-9.]+)")
4.6.8.3

StringPos

StringPos("<string>", "<search>", <pos>)
The StringPos() function searches in the <string> character string for the <search>
character string, starting at the <pos> position.
The <search> character string to be sought is specified via a regular expression. The case-
sensitivity in the <search> argument is not relevant and is not observed.
The function returns the position of the first occurrence of <search> as decimal number. If
the <search> character string was not found, a -1 is returned.
When assessing the returned positions, note that the first character in the <string> is on the
0 position. Spaces in the <string> are also characters, non-printable characters.
Note
Using metacharacters as character literals
Take special care when using metacharacters as character literals in a regular expression.
Further information on regular expressions can be found at Create MyConfig - Diff in Section
"Use of regular expressions in Diff (Page 115)".
SINUMERIK Integrate Create MyConfig - Diff, Expert, Topo
Operating Manual, 12/2017, A5E36537479B-AE
Create MyConfig - Expert
4.6 Script language
;Up.NCU "720"
;Up.NCU "720.3"
291

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828d

Table of Contents