I have this content:
var a = "Hello <sup foot_note=\"81277\">1</sup> World"
And I want to remove the whole html tag: <sup foot_note=\"81277\">1</sup>
I tried it with this code:
let str1 = getText().replacingOccurrences(of: "<[^>]+>", with: "", options: .regularExpression, range: nil)
var str2 = str1.replacingOccurrences(of: "&[^;]+;", with: "", options: .regularExpression, range: nil)
This does not remove the "1", so I get "Hello 1 World". How can I solve this?