(String[] args)
| 9 | */ |
| 10 | public class RegexDemo { |
| 11 | public static void main(String[] args) { |
| 12 | /* |
| 13 | * ����У��绰���� |
| 14 | * |
| 15 | * ������ |
| 16 | * �绰�������� |
| 17 | * 13812345678 |
| 18 | * 13999998888 |
| 19 | * 13123456789 |
| 20 | * 18912345678 |
| 21 | * 18811112222 |
| 22 | */ |
| 23 | //������� |
| 24 | String regex = "1[38][0-9]{9}"; |
| 25 | |
| 26 | //����¼���ֻ����� |
| 27 | Scanner sc = new Scanner(System.in); |
| 28 | System.out.println("�������ֻ����룺"); |
| 29 | String phone = sc.nextLine(); |
| 30 | |
| 31 | //�����жϹ��� |
| 32 | boolean flag = phone.matches(regex); |
| 33 | System.out.println(flag); |
| 34 | } |
| 35 | } |
nothing calls this directly
no outgoing calls
no test coverage detected