Sample code for 30+ languages & platforms
Java

StringBuilder GetBetween

Demonstrates the GetBetween method.

Chilkat Java Downloads

Java
import com.chilkatsoft.*;

public class ChilkatExample {

  static {
    try {
        System.loadLibrary("chilkat");
    } catch (UnsatisfiedLinkError e) {
      System.err.println("Native code library failed to load.\n" + e);
      System.exit(1);
    }
  }

  public static void main(String argv[])
  {
    CkStringBuilder sb = new CkStringBuilder();
    sb.Append("<company><name>Chilkat Software</name></company>");

    //  For example, to get the company name in the string above...
    String companyName = sb.getBetween("<name>","</name>");
    System.out.println("Company Name = " + companyName);
  }
}