Characterset ignore numbers swift 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)