xxxxxxxxxx
StringBuilder builder = new StringBuilder(checkstring);
String regex = "\\p{Punct}"; //Special character : `~!@#$%^&*()-_+=\|}{]["';:/?.,><
//change your all special characters to ""
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(builder.toString());
checkstring=matcher.replaceAll("");