StringSplit

See javadoc - uk.gov.gchq.koryphe.impl.function.StringSplit

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 StringSplit function = new StringSplit(" ");
{
  "class" : "StringSplit",
  "delimiter" : " "
}
{
  "class" : "uk.gov.gchq.koryphe.impl.function.StringSplit",
  "delimiter" : " "
}
g.StringSplit( 
  delimiter=" " 
)

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 ""