Reputation: 141
I have this line:
stringer = str.replaceAll("[\\P{L}\\p{N}\\p{Latin}/u]", " ");
It replaces all Latin chars with space (" ")
but it also replaces numeric symbols
And I don't want it to replace numeric symbols , what do I need to change in this line to make it work?
Upvotes: 0
Views: 123
Reputation: 656
You might want to have a look at the built in android normalizer which will convert them to their non-latin version.
http://developer.android.com/reference/java/text/Normalizer.html
Upvotes: 0
Reputation: 11256
The following should work:
stringer = str.replaceAll("[\\P{L}\\p{N}\\p{Latin}/u&&[^\\d]]", " ");
Upvotes: 2