Number of input and output field
| Number of input field |
: |
One |
| Number of output field |
: |
One |
This transformation function is used to extract the head of a text, starting from the beginning of the string up to the index-th token. If the number of tokens in the input field is less than the specified index, the entire input value is returned as the output.
The parameters of this function are:
- token
The regex token character used as a separator (comma , if not specified).
- index
The token index (1-based). If the value is negative, the index is counted from right to left.
For example, when the input value is:
http://www.solusi247.com/index.php
| token | Index | Result |
| / | 3 | http://www.solusi247.com |
| / | 4 | http://www.solusi247.com/index.php |
| / | -1 | http://www.solusi247.com |