00197195-02-UG SetupCenter 5.1_en - 第92页

Barcode Barcode Labels Importing and Exporting Barcode Labels 92 User Guide SIPLACE Setup Center 5.1 Quantifiers Quantifiers use individual characters or character classes a s o ften as possible. If this pattern is follo…

100%1 / 196
Barcode
Regular Expression - Basics Barcode Labels
User Guide SIPLACE Setup Center 5.1 91
This is then followed by the definition "(?<OriginalQuantity>[0-9]{5,8})" of the packaging unit original
quantity. In this case, the fragment type is "OriginalQuantity", which corresponds to the starting quantity.
The format definition "[0-9]{5,8}"' restricts the character class to the numbers "0" to "9", which ensures
that the original quantity can only be a positive amount. The length "{5.8}" specifies the minimum (5) and
maximum (8) amount of numbers which may be used to define the original quantity.
Lastly, we see the symbol "$", which means that the barcode ends here. It is vital that this character is
positioned here, otherwise any number of other characters could be placed after the string described
above and the barcode would still be recognized.
Please note that a barcode fragment always has the syntax "(?<FragmentType>.{n,m})". The "." in this
syntax can be replaced by other characters or special characters. The characters 'n' and 'm' are always
numbers, which represent the minimum (n) and maximum (m) amount of the pattern located before
them. Furthermore, a barcode should always be framed by "^...$", to clearly indicate where it begins and
ends.
Regular Expression Syntax
Regular expressions are used to define barcode patterns. They describe the barcode text and subdivide
it into individual fragments, with the help of pattern matching.
Individual Characters and Character Classes
The regular expression consists of a character string. Each character in this string stands for itself, un-
less it is one of the special characters +?.*^$()[{|\. The special meaning of these characters can be
canceled by placing a \ before the character concerned e.g. \? or \\.
NOTICE
Extra1, Extra2, Extra3
A barcode label should define a barcode fragment for all parts of a scanned-in barcode.
If the content does not correspond to any predefined fragment type, the fragment types
'Extra1’, 'Extra2’ or 'Extra3' should be used. If you are absolutely sure that a string of char-
acters can be rejected and will not be required again, assign the fragment type ‚Ignore' to
that string.
NOTICE
Diagram of a Barcode Label
The "Barcode label detailed" view can not graphically display all types of a particular bar-
code pattern. For example, the graphic representation of the length may differ from the
sample length defined in the barcode pattern. It may also not be possible to show some
highly complex barcode patterns as a graphic.
Character class Description
. Recognizes any character.
[aeiou] Recognizes each individual character, summarized to form a class of characters
to be recognized.
[^aeiou] Recognizes each individual character which is not in the class of characters.
[0-9a-fA-F] The hyphen allows you to describe a string of connected characters.
\w Recognizes each alphanumeric symbol and an underscore. \w has the same
meaning as [a-zA-Z_0-9].
\W Recognizes each non-alphanumeric symbol and an underscore. \W has the same
meaning as [^a-zA-Z_0-9].
\s Recognizes each whitespace character. \s has the same meaning as [ \f\n\r\t\v].
Barcode
Barcode Labels Importing and Exporting Barcode Labels
92 User Guide SIPLACE Setup Center 5.1
Quantifiers
Quantifiers use individual characters or character classes as often as possible. If this pattern is followed
by ?, the minimum amount will be recognized. The following quantifiers are available:
Anchors, Groupings and Alternatives
Character classes and quantifiers are only a few of the many special characters. The following table ex-
plains the main special characters for barcode patterns: anchors, groups and alternatives.
5.1.5 Importing and Exporting Barcode Labels
Starting with version 3.0, you can import barcode labels from an ApplicationSettings.xml file and export
barcode labels via an ApplicationSettings.xml file.
All labels of the file are imported. It is not possible to add any labels!
This function is useful when the barcode labels need to be transferred from one Setup Center to another
within the same production process.
\S Recognizes each non-whitespace character. \s has the same meaning as [^
\f\n\r\t\v].
\d Recognizes each number. \d has the same meaning as [0-9].
\D Recognizes any sign apart from numbers. \P has the same meaning as [^0-9].
Qualifier Description
* Recognizes the preceding sample element multiple times or not at all e.g. \w* or
(abc)*. Corresponds to {0,}.
+ Recognizes the sample element located before this once or multiple times e.g. \w+
or (abc)+. Corresponds to {1,}.
? Recognizes an element once or not at all e.g. \w? or (abc)?. Corresponds to {0.1,}.
{n} Gives the exact number of hits e.g. p{2}.
{n,} Gives the minimum number of hits e.g. p{2,}.
{n,m} Gives the minimum (n) and maximum (m) number of hits e.g. p{2,3}.
*? Recognizes the sample element but recognizes as few characters/repeats as pos-
sible.
+? Recognizes the sample element at least once but then recognizes as few charac-
ters/repeats as possible.
{n,}? Recognizes the sample element at least "n" times but then recognizes as few char-
acters/repeats as possible.
{n,m}? Recognizes the sample element at least "n" times but then recognizes as few char-
acters/repeats as possible and to a maximum of "m" times.
Qualifier Description
^ Ensures that the following pattern is recognized at the beginning of a character
string, e.g. ^a
$ Ensures that the preceding pattern is recognized at the end of a character string,
e.g. z$
( … ) Groups a number of pattern elements into a single element e.g. (pizza)
… | … | … Recognizes from left to right the first indicated alternative e.g. (a|b|c)
Character class Description
Barcode
Importing and Exporting Barcode Labels Barcode Labels
User Guide SIPLACE Setup Center 5.1 93
Import
Export
Step 1
Right-click with the mouse in the white field of the Label
Overview to open the context menu. Then select the Im-
port barcode labels… option.
Step 2
Confirm the subsequent message with Yes .
All previously configured labels are getting lost during im-
port.
Step 3
Select the directory of the ApplicationSettings.xml file,
from which the barcode labels should be imported.
Step 4
After successful import of the labels, you see the barcode
labels displayed in the overview.
To finish, accept the barcode labels as usual.
Step 1
Right-click with the mouse in the white field of the Label
Overview to open the context menu. Then select the Ex-
port barcode labels… .