I’m looking for a way to remove all references to internal intranet sites in a string while retaining the label.
For instance:
Dim str As String = Nothing
str &= "<a href=""http://intranet/somepage.asp"">Internal Page</a>"
str &= "<a href=""http://www.external.com"">External Page</a>"
Anything that references http://intranet would be considered internal and need to be parsed and removed with regex.
I appreciate your help.
Thanks
While it’s not a regex solution, it’s just as simple. Given your two examples above, you could do the following:
Usage:
This will check if the passed in string contains the intranet address, and if it does, it will split out the string to only return the inner text of the element.