Re: How to convert string into sequence with replacing matched text.

2012-02-13 Thread Takahiro
Tassilo Thank you for sharering your solution. I've just solved this problem in ClojureScript as follows. (defn foobar [acc s] (if-let [[_ pre m post] (re-find #(.*?)(\d+)(.*) s)] (recur (conj acc pre [m]) post) (conj acc s))) (foobar [] hello 1 hello33) ;= [hello [1] hello

How to convert string into sequence with replacing matched text.

2012-02-12 Thread Takahiro Hozumi
Hi, I want to make a sequence from string as follows. input: hello 1 world 2 output: (hello [1] world [2]) What is efficient way to achieve this in ClojureScript? Thanks. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: How to convert string into sequence with replacing matched text.

2012-02-12 Thread Tassilo Horn
Takahiro Hozumi fat...@googlemail.com writes: Hi! I want to make a sequence from string as follows. input: hello 1 world 2 output: (hello [1] world [2]) What is efficient way to achieve this in ClojureScript? This is a JVM Clojure solution. I'm not sure if ClojureScript has