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 (.toLowerCase (:name entry)))]
    (when (re-find m) 
      entry)))

i have not used js much... how to use js regular expr 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" <vince...@gmail.com <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 clo...@googlegroups.com<javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <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 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