try this function:-
Function Highlight(vFind, vSearch)
Dim RegEx
Set RegEx = New RegExp
RegEx.Pattern = vFind
RegEx.IgnoreCase = True
Highlight = RegEx.Replace(vSearch, "<span class=""Highlight"">" & vFind &"</span>")
Set RegEx = Nothing
End Function
This is not about case sensitive searching, this is about showing the actual
match rather than what was being searched for. Hope that makes sense.
For example:
Response.Write Highlight("something", "Have you seen Something About
Mary?")
Gives:
Something (with highlighted).
If you want to go with jquery then see below link:-
http://hugoware.net/blog/more-jquery-magic-search-highlighting[
^]
Demo[
^]