差异输入的字符是英文的还是中文 或者是 特殊字符

区别输入的字符是英文的还是中文 或者是 特殊字符区别中文和英文字符的方法:Pattern p Pattern.compile(

区别输入的字符是英文的还是中文 或者是 特殊字符

区别中文和英文字符的方法:

Pattern p = Pattern.compile("[&%$#@!(),*^]"); //可在此加上其他的特殊字符    Matcher m = p.matcher(str);    if (m.find()) {    Toast.makeText(getApplicationContext(),"you can not enter special Character", 1).show();    } else {    Toast.makeText(getApplicationContext(),"input ok", 1).show();}