Android正则表达式验证邮箱地址

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控件,用来处理用户的邮箱输入。

Android正则表达式验证邮箱地址,布布扣,bubuko.com

Android正则表达式验证邮箱地址

上一篇:Android禁止按键关闭AlertDialog


下一篇:iOS缓存到内存