InstallAware for Windows Installer
 

Parse String

This command parses a string by a given pattern or position index and splits the result into two new strings.

String

The string to parse.

Pattern or Position

If you are parsing by a pattern, type the pattern to search for. If you are parsing by position, type the position index.

Variable for First Part

If you are interested in the first part of the parse result, enter the name of the variable to receive that part here.

Variable for Second Part

If you are interested in the second part of the parse result, enter the name of the variable to receive that part here.

Operation

Select the type of parsing to perform from the drop-down menu.

Trim Resulting Variables

Check this box to remove leading and trailing spaces, as well as control characters, from the resulting variables.

Ignore Case

If you are parsing by pattern, and you wish to ignore case in pattern matching, check this box.

 Note

  • To trim a string variable, enter the variable name in the String field using the form $VARIABLE$ (so the string is dereferenced from its source variable), enter the same variable name in the Variable for First Part field using the form VARIABLE (so the variable is updated directly), choose the Split at first occurrence of pattern in the Operation field (so the entire string value is used), and check the Trim Resulting Variables box (thus performing the actual trim). Leave all other fields empty and unchecked.