Android examples for Internationalization:English
is Valid English string
import android.annotation.SuppressLint; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.Hashtable; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main{ public static boolean isValidEnglish(String str) { if (null == str) { return false; }// w ww . jav a2 s .co m Pattern p = Pattern.compile("^[A-Za-z]*$"); Matcher match = p.matcher(str); return match.matches(); } }