EXTSTR
The EXTSTR function extracts a substring from the input string.
This component searches the input string for the specified substring and outputs the substring to the right or left of the matching string as specified.
Input
Number of Connections: Min: 1/Max:2
Input | Data Type | Description |
Input1 | String | The string on which the search is made. |
Input2 | String | Sets the Search property. (optional) |
Output
Output | Data Type | Description |
Output1 | String | The extracted substring. |
Property
Name | Property Type | Description |
Search | String | The substring to search for. |
SearchDir | choice | The direction from which the search is made.
Left | - |
Begins the search from the left of the string.
|
Right | - |
Begins the search from the right of the string.
|
|
GetDir | choice | Defines which portion of the original string is to be output if a match is made.
Left | - |
Returns the portion of the original string to the left of the matched substring.
|
Right | - |
Returns the portion of the original string to the right of the matched substring.
|
|
Topic
- The output string does not contain the
Search
substring.
- Null is returned if the
Search
substring is not found.
Example
| Property | Output |
Input 1 | abyzcdyzef | Search | yz | ab |
| | SearchDir | Left | |
| | GetDir | Left | |
| Property | Output |
Input 1 | abyzcdyzef | Search | yz | cdyzef |
| | SearchDir | Left | |
| | GetDir | Right | |
| Property | Output |
Input 1 | abyzcdyzef | Search | yz | ef |
| | SearchDir | Right | |
| | GetDir | Right | |