A substring is a string within a string. For example, tab and able are both substrings of table. You can use the[ ] operator to specify a substring using this syntax:
string[ [ start, ] length ]
string is the string containing the substring.
start is a number specifying where the substring starts. The first character of string counts as 1. If start is 0 or a negative number, the starting position is assumed to be 1. If start is omitted, the starting position is calculated according to the following formula:
string.length - substring.length + 1
"1234567890" [5]
returns the substring:
67890
string [ delimiter, instance, fields ]
The delimiters that mark the start and end of the extraction are not returned, but if you extract more than one string, any interim delimiters are returned. This syntax works the same way as the Field function.
A="12345"
A[3]=1212
returns the result 121212.
This syntax works the same way as the FieldStore function.