I have the following String passed from another application.
2�4�9�
(2�4�9�)
I would like to remove question mark ascii characters from the above string.
How could I do this?
I have the following String passed from another application.
2�4�9�
(2�4�9�)
I would like to remove question mark ascii characters from the above string.
How could I do this?
According to this Unicode code table, �
(or \ufffd
) is the character �.
You can remove this unicode character from your string with :
str = str.replaceAll("�", "");
But you should really try to understand why they are there.
string.replaceAll("\u0000.*","").replaceAll("[^a-zA-Z0-9 ]", "");
will remove the empty spaces & punctuation marks in the string variable.