Metrohm viva 1.0 (process analysis) User Manual
Page 551
■■■■■■■■■■■■■■■■■■■■■■
5 Method
viva 1.0 (for Process analysis)
■■■■■■■■
539
NOTE
Several indexed variables (e.g. Input1, Input2, etc.) can also be cre-
ated in order to be able to store the substrings requested with regular
expressions directly in various variables.
Example
Variable = SD.Input1
Comparison = (\d+\.\d+),(\d+\.\d+)
Two measured values (separated by a comma) are filtered out of a ran-
dom receiving line and saved in the two variables SD.Input1 and
SD.Input2.
Comparison
Entry of a character string that is to be compared with the incoming data
of the actions Read, Wait for and Poll. Here it is possible for so-called
regular expressions to be entered. With the aid of these precisely
defined search patterns, you can interpret received character strings and
save certain contents from them in a sample data variable. Regular expres-
sions are often used in computer science (operating systems UNIX or
LINUX, script languages PERL, etc.) and have become largely standardized.
viva makes full use of Extended Regular Expressions in accordance
with Java
).
Entry
100 characters
Examples for Regular Expressions:
Expression
Meaning
Example
[abc]
OR function for individual
characters
Receive a or b or c
[a-z0-9]
One character in the speci-
fied range
m or 5
(hallo)
Substring
Character string contains
hallo
^hallo
Start of line
hallo stands at the start
of the line
hallo$
End of line
hallo stands at the end of
the line
.
Any single character
a or 4 or - or …