Extracts a sequence of characters from a specified location (offset) in a string variable and stores the extraction in another string variable. |
This is useful for extracting a sequence of characters for use in a customer account number validation, for example.
Option |
Description |
From |
Enter the string variable to extract from. |
To |
Enter the string variable in which to store the extraction. |
Offset |
Enter the offset from which to begin the extraction (a literal value preceded by =, or an integer variable). Enter a positive value to extract the first character after the specified offset. For example, a value of 6 applied to string X12345ABC begins the extraction at 'A'. (An offset value that is greater than the string length results in no extraction.) Enter 0 to extract from the start of the string. For example, for the string X12345ABC, the extraction begins at 'X'. Enter a negative value to extract from that number of characters from the end of the string. For example, a value of -3 applied to string X12345ABC begins the extraction at 'A'. (An offset that is greater than or equal to the string length is equivalent to using a 0 offset. For example, a value of -9 begins the extraction at 'X'.) |
Length |
The number of characters to extract in a left-to-right direction from the offset location. Enter a positive number to extract the specified number of characters from the offset location. For example, assuming an offset of 1, a value of 5 applied to string X12345ABC extracts '12345'. (A value that is greater than the string length results in all characters being extracted.) Enter a negative value to exclude the specified number of characters from the end of the string and extract the remaining characters. For example, assuming an offset of 1, a value of -3 applied to string X12345ABC extracts '12345'. (A value that is greater than or equal to the number of characters from the offset location, results in no extraction.) |
Exit Point |
Description |
Complete |
This is taken when the action cell has executed. |
Error |
This is taken if an internal error occurred. |