swift replace all character expect alphabeth code example
Example: swift replace all characters except numbers
let result = string.trimmingCharacters(in: CharacterSet(charactersIn: "0123456789.").inverted)
let result = string.trimmingCharacters(in: CharacterSet(charactersIn: "0123456789.").inverted)