I am trying some regex in Clojure and I have problems using regex
literals.


Don't know why the following doesn't seem to work:

user=> (re-seq #"\\W+" "the quick brown fox")
()
user=> (re-seq #"\\w+" "the quick brown fox")
()
user=> (re-seq #"\\s" "the quick brown fox")
()
user=> (re-seq #"\\S" "the quick brown fox")
()

++++

Only this works:

user=> (re-seq #" " "the quick brown fox")
(" " " " " ")

user=> (re-seq #"[^ ]+" "the quick brown fox")
("the" "quick" "brown" "fox")

++++

Is there any detailed info on using regex literals in Clojure?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to