Supported in: Batch, Faster, Streaming
Returns an array of indices (counted as Unicode code points) at which the regular expression pattern is found in the given expression.
Expression categories: Regex, String
Output type: Array<Integer>
Description: You can find regex patterns and their indices.
Argument values:
Output: [ 0, 2, 4 ]
Description: Overlapping matches are not considered separately; the entire matching segment is treated as a single match.
Argument values:
Output: [ 0 ]
Description: Regex patterns sometimes don't match input strings, resulting in an empty array.
Argument values:
Output: [ ]
Argument values:
stringpattern| string | pattern | Output |
|---|---|---|
| Hello 👋 World | World | [ 8 ] |
| café123 | \d+ | [ 4 ] |
| a🎉b🎊c🎁d | [a-z] | [ 0, 2, 4, 6 ] |
| Hi_café_😀_end | end | [ 10 ] |
Argument values:
stringpattern| string | pattern | Output |
|---|---|---|
| foofoo | [def | null |
| foofoo | [def] | [ 0, 3 ] |
| null | ab | null |
| null | null | null |
Description: If the expression is null, the output is null.
Argument values:
Output: null
Description: If the pattern is null, the output is null.
Argument values:
Output: null
Argument values:
stringpattern| string | pattern | Output |
|---|---|---|
| foofoo | foo | [ 0, 3 ] |
| foo | null | null |
| null | ab | null |
| null | null | null |