1 // 邮箱有效性验证 2 Pattern pattern = Pattern 3 .compile("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); 4 Matcher mc = 5 pattern.matcher(RegistMail.getText().toString().trim());
其中RegistMail为一个EditText控件,用来处理用户的邮箱输入。
2021-07-08 11:31:54
1 // 邮箱有效性验证 2 Pattern pattern = Pattern 3 .compile("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"); 4 Matcher mc = 5 pattern.matcher(RegistMail.getText().toString().trim());
其中RegistMail为一个EditText控件,用来处理用户的邮箱输入。
下一篇:iOS缓存到内存