Java/Regular Expressions/Email
Validate email address
public class Main {
public static void main(String[] args) {
System.out.println("isValid = " + isValidEmailAddress("user@domain.ru"));
}
static boolean isValidEmailAddress(String email) {
String EMAIL_REGEX = "^[\\w-_\\.+]*[\\w-_\\.]\\@([\\w]+\\.)+[\\w]+[\\w]$";
return email.matches(EMAIL_REGEX);
}
}