StringRegexSplit
See javadoc - uk.gov.gchq.koryphe.impl.function.StringRegexSplit
Available since Koryphe version 1.9.0
Split a string using the provided regular expression.
Examples
Split strings with regex
Java
JSON
Full JSON
Python
final StringRegexSplit function = new StringRegexSplit("[ \\t]+");
{
"class" : "StringRegexSplit",
"regex" : "[ \\t]+"
}
{
"class" : "uk.gov.gchq.koryphe.impl.function.StringRegexSplit",
"regex" : "[ \\t]+"
}
g.StringRegexSplit(
regex="[ \t]+"
)
Input type:
java.lang.String
Example inputs:
Input Type | Input | Result Type | Result |
---|---|---|---|
java.lang.String | no-delimiters-in-this-string | java.util.Arrays$ArrayList | [no-delimiters-in-this-string] |
java.lang.String | string with two spaces | java.util.Arrays$ArrayList | [string, with, two, spaces] |
java.lang.String | string with one space | java.util.Arrays$ArrayList | [string, with, one, space] |
java.lang.String | tab delimited string | java.util.Arrays$ArrayList | [tab, delimited, string] |
java.lang.String | java.util.Arrays$ArrayList | [] | |
null | null |