Studyon Minte9.com
Regexp




Split



	%java
		Pattern pat = Pattern.compile("[ ,.!]");
		String strs[] = pat.split("one two,alpha9 12!done.");
		
		for(int i=0; i<strs.length; i++){
		    System.out.println(strs[i]);
			// one
			// two
			// alpha9
			// 12
			// done
		}


	%java
		Pattern pat = Pattern.compile("[ !]");
		String str[] = pat.split("Hello World!");
		for(String x:str) {
			System.out.println(x); // Hello ; World
		}