I am trying to construct Regex
but it doesn't work. Can anyone help?
I have a string, which I want to remove the following characters:
*_-+=#:><&[]\n
And instruct also to remove all text between (/
and )
Code is belkow:
if let regex = try? NSRegularExpression(pattern: "&[^*_-=;](\\)*;", options: .CaseInsensitive) {
let modString = regex.stringByReplacingMatchesInString(testString, options: .WithTransparentBounds, range: NSMakeRange(0, testString.characters.count), withTemplate: "")
print(modString)
}