ActionScript 3中的有效电子邮件 [英] Valid Email in ActionScript 3

查看:148
本文介绍了ActionScript 3中的有效电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用

var emailExpression:RegExp = /^[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/i;

用于在ActionScript3的联系人表单中进行验证检查。

for validation check in a contact form in ActionScript3.

问题是,如果提交的电子邮件是以数字字符开始,那么它会被拒绝。
例如,电子邮件45yah.yah@yahoo.com被拒绝,但邮件yah45.yah@yahoo.com是可以接受的。

The problem is that if the email submitted starts with a numeric character then it is rejected. for example the email 45yah.yah@yahoo.com is rejected but the mail yah45.yah@yahoo.com is acceptable.

我应该改变什么?

推荐答案

var emailExpression:RegExp = /^[\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/i;

顺便说一句,您是否尝试这个

BTW, did you try this?

这篇关于ActionScript 3中的有效电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆