package org.abin.lee.basic.regex;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class MyRegex {
public static boolean getResult(String future){
boolean result=false;
String regex="^[0-9a-zA-Z_]+@?[0-9a-zA-Z_]+.[a-zA-z]+$";
// String regex="^1(3[4-9]?|5[018-9]?|8[07-9]?)[0-9]{8}$";
Pattern pattern=Pattern.compile(regex);
Matcher matcher=pattern.matcher(future);
result=matcher.matches();
return result;
}
public static void main(String[] args) {
boolean flag=false;
String future="varyall@tom.com";
// String future="13588844873";
flag=getResult(future);
System.out.println("flag="+flag);
}
}