beautypg.com

Metrohm tiamo 1.0 Manual User Manual

Page 526

background image

502

Method

Comparison

100 characters, [ 'empty' ]

Entry of a character string which should be compared to the data received

by one of the

Actions

Read

,

Wait for a

nd

Poll

. In this field so-called Regular

Expressions can be entered. You can use these exactly defined search
patterns to interpret the received character strings and save contents from
this strings in a method variable. Regular Expressions are widely used in
computer science (operating systems UNIX or LINUX, s script languages

PERL, etc.) and are standardized to a great extent. In tiamo Extended
Regular Expressions
according to Java 2 Platform SE v1.4.2 can be
use (details see e.g. http://en.wikipedia.org/wiki/Regular_expression).

Examples for Regular Expressions:

Expression

Meaning

Example

[abc]

OR function for single characters

receive

a

or

b

or

c

[a-z0-9]

character in the specified range

m

or

5

(hallo)

substring string

contains

hallo

^hallo

start of line

hallo

is at start of line

hallo$

end of line

hallo

is at end of line

.

any single character

a

or

4

or

or ...

\.

point

.

\d

one digit

3

\d+

several digits

324567

\d{4}

four digits

3143

\D

not one digit

A

or

!

or ...

\w

a digit or a letter

a

or

3

\W

neither digit nor letter

!

or

.

.*

any character string

abcd

or

41

or

–$=$

or ...


Any combination of regular expressions is possible.

Note
In order to save the received data in a variable open and close brackets must be
set in the field

Comparison

anyway. Therefore, to save a complete character

string in a variable the expression

(.*)

must be entered in the field

Comparison

.