If "nsub" is zero, then the "subs" pointer is ignored. In this
case, substitution strings may be specified by appended them to
the end of the "pattern" string, separated by "=" characters.
Note, if you need to include a literal "=" character in the
pattern, precede it by an escape "" character.
Multiple template strings can be concatenated, using the ""
character to separate them. The test string is compared against
each one in turn until a match is found.
Parentheses are used within each template to identify sub-strings that are to be replaced by the strings supplied in "sub".
If "nsub" is supplied as zero, then substitution strings may be specified by appended them to the end of the "pattern" string, separated by "=" characters. If "nsub" is not zero, then any substitution strings appended to the end of "pattern" are ignored.
Each element of "subs" may contain a reference to a token of the form "$1", "$2", etc. The "$1" token will be replaced by the part of the test string that matched the first parenthesised sub-string in "pattern". The "$2" token will be replaced by the part of the test string that matched the second parenthesised sub-string in "pattern", etc.