How can non-ASCII characters be removed from a string?

This will search and replace all non ASCII letters:

String resultString = subjectString.replaceAll("[^\\x00-\\x7F]", "");

Leave a Comment