C#C
C#2y ago
Tandy

Regex negative lookahead not working

I am trying to use regular expressions to detect URLs in dynamic text (I know). I have a pretty good working example, but I'm struggling to filter out certain HTML codes that could be present in the dynamic text. For example, the current regex is capturing google.com&#160 as the URL for the following text: visit us at google.com for more information. I'd like to prevent that and only match on google.com. I tried to add a negative lookahead to remove matches on &#160, but it's not working. Can anyone help?
https://regex101.com/r/WJ6y2x/2
Was this page helpful?