当前位置 : 主页 > 编程语言 > c++ >

见到别人的,不太懂

来源:互联网 收集:自由互联 发布时间:2021-06-30
gistfile1.txt package xiti;import java.util.Scanner;public class Sjcj {public static void main(String[] args) {System.out.println("please input numbers or e-mail");Scanner in=new Scanner(System.in);String s=in.nextLine();System.out.println(
gistfile1.txt
package xiti;

import java.util.Scanner;

public class Sjcj {
	public static void main(String[] args) {
		System.out.println("please input numbers or e-mail");
		Scanner in=new Scanner(System.in);
		String s=in.nextLine();
		System.out.println("e-mail"+" "+s.matches("-?\\w+\\x40\\w+\\x2e\\w+"));
		System.out.println("numbers"+" "+s.matches("-?\\w+"));
 }
}
网友评论