public static void main(String[] args)throws Exception{
    StringChunker sc=new StringChunker(args[0]);
    System.out.println("Upto/Found:");
    Pattern regex=Pattern.compile(args[1]);
    System.out.println("\nTest 1:");
    while (sc.find(regex)){
      rip("upto:", sc.getUpTo());
      rip("found:", sc.getFound());
    }
    System.out.println("Leftovers:");
    rip("rest:", sc.getRest());

    System.out.println("\nTest 2:");
    sc.reset();
    while (sc.findOrFinish(regex)){
      rip("upto:", sc.getUpTo());
      rip("found:", sc.getFound());
    }
  }