Extract sub-strings matching a specified regular expression
astChrSplitRE
"
Template Syntax:"
in the astChrSub prologue. Note, this function
differs from astChrSub in that any equals signs (=) in the regular expression are
treated literally. "
regexp"
. A NULL pointer
is returned if no matches were found. A NULL pointer may be supplied if the
location of the last matching character is not needed. "
n"
elements. Each element is a pointer to a dynamically allocated character string
containing a sub-string extracted from the supplied string. The array itself, and the
strings within it, should all be freed using astFree when no longer needed. If a parenthesised sub-string in the regular expression is matched by
more than one sub-string within the test string, then only the first is
returned. To return multiple matches, the regular expression should include
multiple copies of the parenthesised sub-string (for instance, separated by "
.?"
if
the intervening string is immaterial).
A NULL pointer is returned if this function is invoked with the global error status set or if it should fail for any reason, or if the supplied string contains no words.