We Recommend

Essential ActionScript 3.0 Essential ActionScript 3.0
The book focuses on the core language and object-oriented programming, but also adds a deep look at the centerpiece of Flash Player's new API: display programming. Enjoy hundreds of brand new pages covering exciting new language features, such as the DOM-based event architecture, E4X, and namespaces--all brimming with real-world sample code.


Posted By

chrisaiv on 03/12/08


Tagged


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

blackabee
outbox


Flash E-mail This Validator


Published in: ActionScript 3 


  1. function is_valid_email(email:String):Boolean
  2. {
  3. var emailRgx:RegExp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
  4. ///^[a-zA-Z0-9][-._a-zA-Z0-9]*@([a-zA-Z0-9]*\.)+[a-zA-Z]{2,6}$/;
  5. trace(emailRgx.test(email));
  6. return emailRgx.test(email);
  7. }
  8. is_valid_email("c@j.co");

Report this snippet 

You need to login to post a comment.