Search Highlight comes with error on excerpt in search result


I’m not sure what’s going wrong. I’m using a “search highlight” on my wordpress website. I recently noticed 1 issue when doing a search on my site. How to say? Hmm…For example, either post excerpt or content contains active url(clickable), and the keyword is also in the url as well. The search result will become like as displayed in the image as per attached. The highlighted one suppose to be a proper url(www.properurl.com). But, it turned out this result. enter image description here

Below the PHP code of search highlight placed in the functions.php

function search_excerpt_highlight() {     $  excerpt = get_the_excerpt();     $  keys = implode('|', explode(' ', get_search_query()));     $  excerpt = preg_replace('/(' . $  keys .')/iu', '<span class="search-highlight"><u><b></b></u></span>', $  excerpt)."";      echo '<p class="excerpt">' . $  excerpt . '</p>'; } 

I need to know if there is any code i can put in functions.php to make it work correctly?

Need help in this. Thank you!