regexp.splitRegexp() function
The regexp.splitRegexp()
function splits a string into substrings separated by
regular expression matches and returns an array of i
substrings between matches.
Output data type: Array of Strings
import "regexp"
regexp.splitRegexp(r: /a*/, v: "abaabaccadaaae", i: 5)
// Returns ["", "b", "b", "c", "cadaaae"]
Parameters
r
The regular expression used to search v
.
v
The string value to search.
i
The maximum number of substrings to return.
-1
returns all matching substrings.
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, use the following resources:
InfluxDB Cloud customers can contact InfluxData Support.