The SNOBOL4 pattern matcher is called the "scanner." The "cursor" is the scanner's pointer into the subject string; it points between subject characters (no relation to your CRT cursor). It is initially zero when positioned to the left of the subject, and is incremented as the scanner moves to the right in the subject.
Causes immediate failure of the entire pattern match, without seeking alternatives.
Matches zero or more characters of the subject string. It matches the shortest possible substring.
Matches any nonnull string which is balanced with respect to parentheses. A string without parentheses is considered balanced. BAL matches the shortest string possible.
Causes failure of this portion of the pattern match, causing the scanner to backtrack and try alternatives.
Matches the null string and succeeds when the scanner is moving left to right in a pattern, but fails if the scanner has to back up through it, seeking alternatives.
Matches zero or more characters from the current cursor position to the end of the subject string.
Matches the null string and always succeeds.
ARB = &ARB . OUTPUT
Pattern functions may be combined with other primitive patterns, functions, and strings using the alternation and concatenation operators to produce larger patterns.
Matches exactly one character from the set of characters specified by the argument string.
Matches zero or more consecutive occurrences of the string matched by the argument pattern. ARBNO matches the shortest string possible--initially the null string--and only tries to match pattern if other pattern components in the statement require it.
Matches zero or more characters provided they are not in the set of characters in the argument string. That is, it matches up to, but not including, a character from the argument string.
Matches a string of the specified length. There are no restrictions on the subject string characters. An argument of zero will match the null string.
Matches exactly one character provided it is not in the set of characters specified by the argument string.
Succeeds if the scanner's current cursor position in the subject string is equal to the specified integer value. This function merely verifies scanner position---it does not consume or match any subject characters. POS(0) as the first component of a pattern produces an anchored pattern match.
Succeeds if the scanner's current cursor position in the subject string is the specified number of characters from the end of the string. Like POS(), it verifies scanner position but does not consume any characters. RPOS(0) as the last component of a pattern forces the pattern to match to the end of the subject string.
Matches all characters from the current cursor position up to the specified cursor position, counting from the end of the subject string. RTAB(N) matches characters up to, but not including, the final N characters of the subject.
Matches one or more characters from the set of characters specified by the argument string. SPAN will not match the null string; at least one character from the argument string must be found in the subject.
Matches all characters from the current cursor position up to the specified cursor position. TAB(N) matches characters up to, and including, the initial N characters of the subject. TAB will match the null string if the target position and current cursor position are the same. The function fails if the current scanner position is to the right of the target position.