Development Java Tutorial

import java.util.Arrays;
import java.util.regex.Pattern;
public class MainClass {
  public static void main(String[] args) {
    String input = "This!!unusual use!!of exclamation!!points";
    System.out.println(Arrays.asList(Pattern.compile("!!").split(input)));
    System.out.println(Arrays.asList(Pattern.compile("!!").split(input, 3)));
    System.out.println(Arrays.asList("Aha! String has a split() built in!".split(" ")));
  }
}
/**/
[This, unusual use, of exclamation, points]
[This, unusual use, of exclamation!!points]
[Aha!, String, has, a, split(), built, in!]