I'm trying to convert the parts of code that Xcode couldn't convert to Swift3
In swift 2.3 to replace multiple characters in a string I used :
var phone = "+ 1 (408)-456-1234"
phone = phone.replaceCharacters(" ) ( - ‑", toSeparator: "")
this should give +14084561234
In swift 3 I'm using this :
phone = phone.replacingOccurrences(of: " |(|)|-", with: "z",options: .regularExpression)
this code gives +1(408)4561234
How to replace multiple characters in a string (Swift3)?
but this is not working correctly ? any ideas