Java 正则表达式

Pattern p = Pattern.compile("[,#%^]+");
		String[] ss = p.split("www,#xmu#edu%%com^cn");
		System.out.println(Arrays.toString(ss));
		
		Pattern p1 = Pattern.compile("[-_\\w]+@([_\\w]+.)+[\\w]{2,3}");
		String input = "[email protected][email protected]";
		Matcher m = p1.matcher(input);
		while(m.find()){
			System.out.println(m.group());
		}
 

你可能感兴趣的:(正则表达式)