Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static final String EMAIL_FORMAT = "^[\\w-_\\.+]*[\\w-_\\.]\\@([\\w]+\\.)+[\\w]+[\\w]$";

    private static boolean isEmailValid(String email) {
        if (!email.matches(EMAIL_FORMAT)) {
            return false;
        }
        return true;
    }
}