You can use regular expressions when searching to specify a set of strings that all match the regular expression.
A simple text pattern is a combination of characters that can be supplemented by an asterisk '*' as a joker for any number of any type of character.
You can use simple text patterns when searching for names.
An example for a simple pattern, generally termed "pattern":
You can use text patterns or regular expressions in various Innovator components to specify not just a single string but a set of strings that all match the text pattern or the regular expression.
Regular expressions are used in Innovator in the following places:
in the client, when searching for contained text in specifications or annotations
in the configuration editor, to describe a name constraint
Here, an entered name is checked for validity against this pattern and then approved or rejected.
The regular expressions in Innovator use a subset of the options for forming text patterns described, for example, in Wikipedia (http://en.wikipedia.org/wiki/Regular_expression).
This section explains how to form regular expressions.
In Innovator, regular expressions are always evaluated within a paragraph.
Example:
Searching for class.*multiple returns the following text.
Searching for class.*attributes does not return this text.
The class has multiple
- attributes
-methods
Each character is represented by itself apart from the special characters '\', '[', ']', '.', '*', '$' and '^'.
The minus sign '-' only has a special meaning if it is in square brackets.
A set of characters is defined between square brackets []. The expression then stands for a character from this set.
The set can be defined by enumeration of its elements and/or specifying an area in the ASCII table. Such ranges are specified by their first and last characters, separated by a minus sign '-'.
Within these square brackets, special characters have no meaning, i.e. '\', '$', '^', and '.' represent themselves. This means that the beginning of a line cannot be defined as an element of a set, for example. However, the hat '^' has another special meaning in a certain position within square brackets. If a hat '^' immediately follows an opening square bracket '[', the complement of the specified set is searched for.
Examples:
m[aiu]ster returns master, mister or muster
test[1-4] returns test1, test2, test3 or test4
[^A-Za-z] returns all characters apart from letters
A period '.' represents any character.
Example:
function(.) returns function(a), function(3) ...
The asterisk '*' represents any frequency of repetitions of the preceding expression (including none).
Examples:
off[a-z]* returns off, offline, office ...
[1-9][0-9]* returns all natural numbers
The hat '^' represents the beginning of a line.
Example:
^variable returns variables at the beginning of a line
The dollar sign '$' represents the end of a line.
Example:
term;$ returns term; at the end of a line
If you want to search for special characters themselves, they must be masked with a backslash '\'.
Examples:
surname\\first name returns surname\first name
\[a\] returns [a]
\^hat returns ^hat
dollar\$ returns dollar$
An additional special character, the vertical line '|', can be used in the configuration editor'. This represents 'or'. Here, the alternatives are separated from the remaining text using parentheses.
Example:
(in|out)put returns input and output
A more complex example for a date (does not check for the number of days in a given month!):
^(0[1-9]|[12][0-9]|3[0-1])\.(0[1-9]|1[0-2])\.(19|20|21)[0-9][0-9]$
© 1986-2014 MID GmbH Nuremberg Germany. DIN EN 9001 certified. All rights reserved.