I’m using some regex to fish out external CSS for html. In Patterns the regex works fine:
In Xojo with the following code:
dim html as String = backen
dim theRegex as new RegEx
theRegex.options.greedy = False
theRegex.Options.TreatTargetAsOneLine = True
theRegex.Options.DotMatchAll = True
'remove external css
theRegex.searchPattern = "(?i)<link[^>]+href\s*=\s*['""](.*?css.*?)['""][^>]*>"
theRegex.ReplacementPattern = ""
Html = theRegex.Replace(html)
me.LoadPage(html, nil)
almost all html is removed:
Partial html:
Neuer Beitrag "Saftige Mandelhörnchen mit Marzipan"
What is wrong with the Xojo code?
9 posts - 3 participants