Given the needle and the haystack ... I want to put bold tags around the needle. So, what expression expression would I use with replacement ()? I want the space to be a divisor, and I want the search to be case insensitive.
so say that the needle is "cow" and haystacks
cows at www.cows.com, milk some COWS
will turn into
<b>cows</b> at www.cows.com, milk some <b>COWS</b>
also the keywords must have spaces in it, therefore, if the keyword is "who is mgmt" ...
great band. who is mgmt btw?
will turn into
great band. <b>who is mgmt</b> btw?
thanks
javascript regex
rawrrrrrrrr
source share