Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.regex.*;
- import java.util.Scanner;
- public class Email
- {
- public static void main(String[] args)
- {
- System.out.println(Pattern.matches("^[\\w!#$%*/?|^{}'+\\-=_]+(\\.[\\w!#$%*/?|^{}'+\\-=_]+){0,1}@\\w+(\\.\\w+)*\\.(com|org|net|nu|se)$", new Scanner(System.in).nextLine()));
- }
- }
Add Comment
Please, Sign In to add comment