clojure.contrib.str-utils/re-partition is what you are looking for;

(re-partition #"\w+" "   a word and another word1   ")

-> ("   " "a" " " "word" " " "and" " " "another" " " "word1" "   ")


On Aug 11, 12:57 pm, ogcraft <ogcr...@gmail.com> wrote:
> How can I split a string,  but not to drop witespaces.
> Like this:
>
> "   a word and another word1 "  --> ("   ", "a", " ", "word", " ",
> "and", " ", "another", " ", "word1", " ").
>
> Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to