The following subroutine highlights text via insertion of style tags. The text to be highlighted is entered by the user. The string being searched is HTML, so if there is a match within an anchor tag then the inserted style tags break the link. I have been trying to figure out how to omit matches that appear within an anchor tag. The code I have is as follows:<BR><BR>Sub SrchHilite(qry, str)<BR> Set objRegExp = New RegExp<BR> objRegExp.IgnoreCase = True<BR> objRegExp.Global = True<BR> objRegExp.Pattern = qry<BR> str = objRegExp.Replace(str, "&#060;cite&#062;" & qry & "&#060;/cite&#062;")<BR> Set objRegExp = Nothing<BR>End Sub<BR><BR>I did not include all my unsuccessful attempts but there are many. Any help would be much appreciated!<BR><BR>Thanks.