I was trying for some time to write a js function that will highlight (bold) every occurance of the searched text in the string that contain html tags.
Example: imagine that the string is
<b>test string</b> -- Bette <b>Higgins</b>
If I search for a character 'b', the result should be
<b>test string</b> -- <b>B</b>ette <b>Higgins</b>
(as you can see every occurrence of B should be surrounded with the html bold tag.
I tried using various regex expressions without success.
Any idea?
Thank you