
This function is used to extract a substring of a field or named variable. The extracted substring is saved to a track or named variable.
All supplied text fields may contain any of the escape sequences described in Escape Sequences. Escape Sequences are reevaluated for each processed file.
All indexes are zero based. ie. the first character in a string is at index 0.
An index field which evaluates to be less than zero is treated as relative from the end of the field.
A length field which evaluates to be a negative number is interpreted as to the end of the field.
There are four modes in which a substring can be extracted:
index = 1, length = 2 --> bc
index = 2, length = -1 --> cde
index = -3, length = 2 of --> cd
index = 6, length = 1 of --> an empty string
index = -7, length = 3 of --> a
index = 3 --> abc
index = 1 --> a
index = 0 --> an empty string
index = -2 --> abc
index = 10 --> abcde
index = 3 --> de
index = 6 --> an empty string
index = -2 --> de
index = -10 --> abcde
range = 3 --> de
range = 3, --> de
range = 3,1 --> d
range = 2,10 --> cde
range = -1,3 --> e
range = -3,1 --> c
range = 10,2 --> an empty string
range = 1,-1 --> bcde
range = empty --> empty