\p{ASCII} is POSIX character classes.It will replace the non ascii string and return the string(Printable ASCII).
String string=givenString.replaceAll("[^\\p{ASCII}]", "");
Java Interview Question,Java tutorial and Java related Stuffs
package com.zia.test; import java.util.HashMap; import java.util.Map; import java.util.Set; public class findDuplicateCharacter { /**...
No comments:
Post a Comment