To know whether at least one match exists. : RegExp : Regular Expressions Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Regular Expressions » RegExp »

 

To know whether at least one match exists.


 


package{
  import flash.display.Sprite;
  import flash.utils.*;
  public class Main extends Sprite{
    public function Main(){

        var sEmail:String = new String("someone@someserver.com");
        var reEmail:RegExp = new RegExp("^([\w\-\.]+) ;@(([\w\-]{2,}\.)+[\w\-]{2,3})$");
        trace(reEmail.test(sEmail));
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Regular Expressions
» RegExp