You can use PARSE also to
split a string into first char, last char and all chars between the first
and the last char.
Example:
/* split a string into first char, last char, and the chars between */
/* (assuming the last char is unique in the whole string) */
nextLine = "[TestSection]"
parse var nextline firstChar +1 . "" -1 lastChar,
1 (firstChar) SectionName (lastChar)
say "The first char is <" || firstChar || ">"
say "The last char is <" || lastChar || ">"
say "The chars beteween are <" || sectionName || ">"