AS3电子邮件验证
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了AS3电子邮件验证相关的知识,希望对你有一定的参考价值。
The source below is the function from the website with the corrected regular expression found in the site's comments. This is a nigh-one-line function for validating a string as an email address.
*/ syntax: if (!isValidEmail("my_NON_email.com")) { trace("FAIL"); } */ private function isValidEmail(email:String):Boolean { var emailExpression:RegExp = /([a-z0-9._-]+?)@([a-z0-9.-]+).([a-z]{2,4})/; return emailExpression.test(email); }
以上是关于AS3电子邮件验证的主要内容,如果未能解决你的问题,请参考以下文章