Sample code for 30+ languages & platforms
Node.js

StringBuilder GetAfterBetween

Demonstrates the GetAfterBetween method.

Chilkat Node.js Downloads

Node.js
NODEJS_PRELUDE

function chilkatExample() {

    var sb = new chilkat.StringBuilder();
    sb.Append("<abc><person><name>Joe</name></person><company><name>Chilkat Software</name></company></abc>");

    //  The GetAfterBetween method gets the substring between two arbitrary marker strings, and doesn't
    //  start searching until the searchAfter string is passed.

    //  For example, to get the company name in the string above...
    var searchAfter = "<company>";
    var companyName = sb.GetAfterBetween(searchAfter,"<name>","</name>");
    console.log("Company Name = " + companyName);

}

chilkatExample();