Rick McGuire - 2007-04-02

Logged In: YES
Originator: YES

David, this also is going to require some documentation changes. There are two new trigger types introduced to parse:

n (and >(expr)). Matches the next "n" characters of the string. The movement value may be zero, which will result in a null string match. If "n" would extend beyond the end of the string, it will be truncated to the remaining size. The match position will be moved n characters as well.

parse value "1234567890" with '3' a >3 -- equivalent to "... with '3' a +3"
parse value "1234567890" with '3' a >0 -- assigns a null string to A. Not the same as "... with '3' a +0"

<n (and n(expr)). Matches "n" characters before the current match position. If "n" extends past the beginning of the string, the match string will be truncated to the available size. After the match, the current match pointer remains in the same position, so all additional searchs will proceed from the current match point.

parse value "1234567890" with '4' a <2 b -- a == '23', b == '45567890'