I want to know is text contain any letter in Urdu or Arabic..using this condition which produce false results when special characters comes.what is right way to do it .any library or what is right regex for this ?
if (cap.replaceAll("\\s+", "").matches("[A-Za-z]+")
|| cap.replaceAll("\\s+", "").matches("[A-Za-z0-9]+")) {
Log.d("isUrdu", "false");
caption.setTypeface(Typeface.DEFAULT);
caption.setTextSize(16);
} else {
Log.d("isUrdu", "True");
/* if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR1) {*/
caption.setTypeface(typeface);
caption.setTextSize(20);
/* }*/
}