MCPcopy Create free account
hub / github.com/DuGuQiuBai/Java / main

Method main

day14/code/day14_Regex/src/cn/itcast_02/RegexTest.java:16–29  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

14 */
15public class RegexTest {
16 public static void main(String[] args) {
17 //�������
18 //String regex = "[a-zA-Z_0-9]+@[a-zA-Z_0-9]{2,8}(\\.[a-z]{2,3})+";
19 String regex = "\\w+@\\w{2,8}(\\.[a-z]{2,3})+";
20
21 //����¼������
22 Scanner sc= new Scanner(System.in);
23 System.out.println("���������䣺");
24 String email = sc.nextLine();
25
26 //��
27 boolean flag = email.matches(regex);
28 System.out.println(flag);
29 }
30}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected