Мне кажется, это работает
public class QuickyTest{
static String[] testVectors = { "alaskjf",
"o-kay@example.com",
"-dash@x.AA",
"dash-@y.ZZ" };
public static void main( String[] args ) {
Pattern pattern = Pattern.compile( "(?i:[A-Z0-9._%+]+|[A-Z0-9._%+]+[A-Z0-9._%+-]+[A-Z0-9._%+]+@([A-Z0-9-]+.)+[A-Z]{2,4})" );
for( String test : testVectors ) {
Matcher match = pattern.matcher( test );
System.out.println( test + " : " + match.matches() );
}
}
}