Splits string on a regular expression.
Following is the syntax.
(split str reg)
Parameters − ‘str’ is the string which needs to be split. ‘reg’ is the regular expression based on which the string split needs to happen.
Return Value − The split string.
Following is an example of split in Clojure.
(ns clojure.examples.hello (:gen-class)) (defn hello-world  (println (clojure.string/split "Hello World" #" "))) (hello-world)
The above program produces the following output.
Note that in the above output, both the strings “Hello” and “World” are separate strings.