package cn.exercise; import java.util.Scanner; /** * @author WH * @project Java * @package cn.exercise * @date 2019/11/24 18:44 */ public class Email { public static void main(String[] args) { Scanner e=new Scanner(System.in);
String email="\\w*+[@]\\w+[.]\\w*";
String a=e.nextLine(); if (a.matches(email)){ System.out.println("是郵箱"); }else{ System.out.println("不是"); } } }