private function filterNonEnglishChars(input:String):String {
// Regular expression to match non-English characters, symbols, and numbers
var pattern:RegExp = /[^a-zA-Z0-9\s!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/g;
// Replace non-English characters with an empty string
var filtered:String = input.replace(pattern, "#");
return filtered;
}
when I enter don't
its returning don#t