package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var sEmail:String = new String("info@your.com");
var nCheckOne:Number = sEmail.indexOf("@");
var nCheckTwo:Number = sEmail.lastIndexOf(".");
if (nCheckOne!= -1 && nCheckTwo!= -1 && nCheckOne < nCheckTwo){
trace("good email address");
}
}
}
}
|