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 TypeInputResult TypeResult
java.lang.Stringno-delimiters-in-this-stringjava.util.Arrays$ArrayList[no-delimiters-in-this-string]
java.lang.Stringstring with two spacesjava.util.Arrays$ArrayList[string, with, two, spaces]
java.lang.Stringstring with one spacejava.util.Arrays$ArrayList[string, with, one, space]
java.lang.Stringtab delimited stringjava.util.Arrays$ArrayList[tab, delimited, string]
java.lang.Stringjava.util.Arrays$ArrayList[]
nullnull

results matching ""

    No results matching ""