I'm new in clojure programming. I'm learning about splitting a string by defining regular expressions. I'm learning from here https://clojuredocs.org/clojure.string/split
I want to split a string by defining two regular expressions. For example:
=> (require '[clojure.string :as str])
=> (str/split "Hello world! Have a nice day" #" ")
;; ["Hello" "world!" "Have" "a" "nice" "day"]
=> (str/split "Hello world!\nHave a nice day" #"\n")
;; ["Hello world!" "Have a nice day"]
This is cool. Now I'd like to split a string on every space & newline.
If the input is "Hello world!\nHave a nice day", The output should be ["Hello" "world!" "Have" "a" "nice" "day"]
can anyone suggest me, How can I do this? Thanks.