String regEx="[`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}[]‘;:”“’。,、?]";
Pattern p = Pattern.compile(regEx);
Matcher m = p.matcher(name);
if( m.find()){
Toast.makeText(InputRegisterInfoActivity.this, "含不允许输入的特殊符号!", Toast.LENGTH_LONG).show();
}
05-11 20:55