ATL_CHRSPLITRE

Extract sub-strings matching a specified regular expression

Description:

This routine compares the supplied string with the supplied regular expression. If they match, each section of the test string that corresponds to a parenthesised sub-string in the regular expression is copied and stored in the returned GRP group.

Invocation

CALL ATL_CHRSPLITRE( STR, REGEXP, MATCHEND, IGRP, STATUS )

Arguments

STR = CHARACTER ( ) (Given)
Pointer to the string to be split.
REGEXP = CHARACTER ( ) (Given)
The regular expression. See " Template Syntax:" in the astChrSub prologue. Note, this function differs from astChrSub in that any equals signs (=) in the regular expression are treated literally.
MATCHEND = INTEGER (Returned)
The index of the character that follows the last character within the supplied test string (STR) that matched any parenthesises sub-section of " regexp" . A value of 0 is returned if no matches were found.
IGRP = INTEGER (Given and Returned)
An identifier for an existing GRP group, or GRP__NOID. If GRP__NOID is supplied a new empty group is created and its identifier returned. On exit, the group is extended by appending to it a copy of each sub-string extracted from the supplied string.
STATUS = INTEGER (Given and Returned)
The global status.

Notes: