Sample code for 30+ languages & platforms
Lua

StringBuilder GetBetween

Demonstrates the GetBetween method.

Chilkat Lua Downloads

Lua
local chilkat = require("chilkat")

local sb = chilkat.StringBuilder.new()
sb:append("<company><name>Chilkat Software</name></company>")

-- For example, to get the company name in the string above...
local companyName = sb:get_between("<name>", "</name>")
print("Company Name = " .. companyName)