How to remove non-ascii characters from a string in java

In this post, we will see how to remove non ascii character from a string in java.
Sometimes, you get non-ascii characters in String and you need to remove them. We will use regular expressions to do it.

Java program to remove non-ascii characters:

When you run above program, you will get below output:

Add Comment