My regex mojo is not with me today. Why doesn’t the following regex
border *(=|:) *("0"|none);?
match this text:
[quote] margin: 0;
padding: 0;
background:
none; border:
none;
white-space:
normal;
line-height:
normal;
overflow:[/quote]
The code is:
dim theRegex as new RegEx
theRegex.options.ReplaceAllMatches = true
theRegex.Options.Greedy = False
theRegex.Options.DotMatchAll = True
theRegex.Options.TreatTargetAsOneLine = True
theRegex.SearchPattern = "border *(=|:) *(""0""|none);?"
theRegex.ReplacementPattern = ""
Return theRegex.Replace(theHtml)
I need to remove the 2 forms of border=“0” or border:none from html. RegeExRX finds the form border=“0” but not the border:none one. As usual the html isn’t really sane.
Any ideas what I’m doing wrong? Xojo 2018r3.