You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Romi <ro...@gmail.com> on 2011/07/06 12:24:15 UTC

How to match for more than one value in a string using regex match

Hi i want to highlight whole gold ring for this i am doing as

*var match = hitem.text[0].match(/<em>(.*?)<\/em>/);
where hitem.text[0]=<em>Gold</em> <em>Ring</em>
*

but the problem is var match is getting only Gold so i am able to highlight
only Gold, i want to make it an array so that it contains both gold and
ring, how can i do it. look at here http: http://jsfiddle.net/bhXbh/4/

-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-match-for-more-than-one-value-in-a-string-using-regex-match-tp3144199p3144199.html
Sent from the Solr - User mailing list archive at Nabble.com.