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 to incorporate js code here?>
thanks
On Sunday, August 12, 2012 12:04:53 AM UTC+5:30, Maik Schünemann wrote:
>
> 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" <[email protected] <javascript:>>:
>
>> 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 in advance
>> Vincent
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to [email protected]<javascript:>
>> 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] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>
>
--
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