How to highlight text in repeater search results

Hi Velo-Ninja. It’s the first time I’m looking into RegEx, and it seems the find and replace functions will help. Before diving deeper into learning how to do it, I have a question. Here are the steps I’m imagining:

1) Find  $w('#SearchBar').value  in  $item('#definitionText').text 
2) Replace with highlighted text  

Since you can only use HTML for text elements (as far as I know), how can I make the 2nd step happen? In other words, I don’t see how I can take the $w(‘#SearchBar’).value and highlight it with this kind of code:

$w ( ‘#text’ ). html = ‘

${$w(“#text”).text }

’ ,

If I do String($w(‘#SearchBar’).value).html , it doesn’t work.

One idea I have is to have a hidden text element just for this purpose - but maybe there’s a better way?

Thanks very much for your input.