I’m trying to remove some urls in html. The regex is working fine in Patterns:
But in my code the urls are not removed:
if theHtml = "" then Return ""
dim theRegex as new RegEx
theRegex.Options.TreatTargetAsOneLine = True
theRegex.Options.CaseSensitive = False
theRegex.Options.DotMatchAll = True
theRegex.Options.ReplaceAllMatches = True
dim SearchPattern as String = "url\((""(https?://[^""]+)"")\)"
theRegex.Options.Greedy = True
theHtml = theRegex.Replace(theHtml)
'dim m as RegExMatch = theRegex.Search(theHtml)
What am I doing wrong?
Example:
regex.xojo_xml_project.zip (4.4 KB)
9 posts - 5 participants