code is below function
args is entry - a map entry
to-match - a string to match to one of val of key in entry
(defn matchName [ entry to-match]
(let [match-str (.toLowerCase to-match)
str-pattern (re-pattern (str "(" match-str ")"))
m (re-matcher str-pattern (.toL
code entry is a map entry , to-match is string for
(defn matchName [ entry to-match]
(let [match-str (.toLowerCase to-match)
str-pattern (re-pattern (str "(" match-str ")"))
m (re-matcher str-pattern (.toLowerCase (:name entry)))]
(when (re-find m)
entry)))
how t
Could you please post the relevant code? Note that clojurescript uses
Javascript regular expression syntax and not javas
Am 11.08.2012 17:02 schrieb "Vincent" :
> dear all ,
> i am trying a search a string in a clojure map data and then want to
> return the result to be viewed in webpage
> so usin
dear all ,
i am trying a search a string in a clojure map data and then want to return
the result to be viewed in webpage
so using clojurescript .but regular expr. of clojure is not supported it
seems as error is showing when lein cljsbuild
...how to work around thru this? any example?
thanks