## Manual

### 1.4.4. Regular expression

With regular expressions certain sections of column values can be identified via a combination of signs.

Example:

The values in column Standards number consist of complex expressions (e.g. “xyz DIN 174jdfjd”). Within these strings the expressions for Standards numbers used in PARTdataManager tables (“DIN 174”) are to be found. To compare column values of text file and table, the relevant expressions must be extracted from the strings.

Solution:

Expression “DIN [0-9] * “.

So you filter the following string: “DIN“, followed by a blank and a number. The number consists of the digits 0 to 9, which can occur any often in this number.

Used Symbol in correspondence with regular expressions:

 Signs in regular expressions Description * (star) sign(s) left to the star can appear in any number or not at all + (plus) sign(s) left to the plus can appear in any number but at least one time ? (question mark) sign(s) left of the question mark can appear one time or not at all. . (dot) the dot replaces any sign which appears one time [^] (cap with brackets) signs within the brackets and behind the cap are excluded ^ (cap without brackets) signs behind the cap are to position at the beginning of a string \$ (dollar sign) signs followed by a Dollar sign are to position at the end of a string. Possible regular expressions : a prefixed backslash nullifies the function of all other signs in a regular expression

Possible regular expressions:

The following examples are based on character string ABCXYZDEF

 Expression Description Example XYZ Reads out X and Z as well as the defined expression between X and Z. ABC XYZ DEF X . Z Reads out X and Z as well as any expression between X and Z. ABC XAZ DEF ABC XeZ DEF ABC X4Z DEF etc. X .* Z Reads out X and Z as well as any expression (in any number) or no sign between X and Z. ABC XZ DEF ABC XAZ DEF ABC XApZ DEF etc. X .+ Z Reads out X and Z as well as any expression (in any number but at least one time) between X and Z. ABC XAZ DEF ABC XrGZ DEF etc. X .? Z Reads out X and Z as well as one or no expression between X and Z. ABC XZ DEF ABC XAZ DEF ABC X8Z DEF etc. XA + Z Selects X and Z as well as A (in any number but at least one time) between X and Z. ABC XAZ DEF ABC XAAZ DEF ABC XAAAZ DEF etc. XA ? Z Reads out X and Z as well as one A or no A between X and Z. ABC XZ DEF ABC XAZ DEF X[AB] * Z Reads out X and Z as well as any combination between A and B or no expression between X and Z. ABC XZ DEF ABC XAZ DEF ABC XBZ DEF ABC XABZ DEF ABC XBAZ DEF ABC XAAZ DEF ABC XBBZ DEF ABC XABAZ DEF ABC XBBAABAZ DEF etc. X[ ^ AB]Z Reads out X and Z as well as any combination between X and Z, apart from A and B. ABC X AB Z DEF

 Expression Description Example X[A-C]Z Reads out X and Z as well as A, B or C between X and Z. ABC XAZ DEF ABC XBZ DEF ABC XCZ DEF X[0-9] * Z Reads out X and Z as well as any combination of numbers or no expression between X and Z. ABC XZ DEF ABC X0Z DEF ABC X1Z DEF ABC X6372Z DEF etc. X[A-Z][a-z] * Z Reads out X and Z as well as string starting with capital letter and continuing with lower case (in any number) or no String between X and Z. ABC XZ DEF ABC XAZ DEF ABC XAaZ DEF ABC XAgsagZ DEF ABC XBZ DEF etc. ^ ABC Reads out a defined expression if it is positioned at the beginning of the string. ABC XYZDEF Not with: XABCZDEF ABC \$ Reads out a defined expression if it is positioned at the end of the string. XYZDEF ABC Not with: ABCXYZDEF X \. Z Nullifies the function of the dot within the regular expression, so a dot (also \$, ^, \, etc.) can be read out of a string, too. ABCX . ZDEF