验证字符串格式只能为汉字字母数字
String content = “testContent”;
String regex="^[a-zA-Z0-9\u4E00-\u9FA5]+$";
Pattern pattern = Pattern.compile(regex);
Matcher match=pattern.matcher(content);
boolean b=match.matches();
if(b)
{
Toast.makeText(this, "success...", Toast.LENGTH_SHORT).show();
}
else
{
Toast.makeText(this, "fail...", Toast.LENGTH_SHORT).show();
}