Pattern p_idcard = Pattern.compile("^\\d{18}$");
Matcher m_idcard = p_idcard.matcher(idcard.getText().toString());
if (!m_idcard.matches()) {
Toast.makeText(Reg_Studentglbj.this, "请输入正确的身份证号!", Toast.LENGTH_SHORT).show();
Matcher m_idcard = p_idcard.matcher(idcard.getText().toString());
if (!m_idcard.matches()) {
Toast.makeText(Reg_Studentglbj.this, "请输入正确的身份证号!", Toast.LENGTH_SHORT).show();
}
隐藏
插入这句:
ID = new StringBuffer().append(ID.substring(0,6)).append("********")
.append(ID.substring(14)).toString();
ID = new StringBuffer().append(ID.substring(0,6)).append("********")
.append(ID.substring(14)).toString();
zpl1986
2013-07-04 19:17
评论
3
0