The following execution flags are defined as static variables within the Regex class.
| NOTBOL | Match-beginning-of-line operator ^ does not match the empty string at the beginning of string. |
| NOTEOL | Match-end-of-line operator $ does not match the empty string at the end of string. |
When this flag is used, the match-beginning-of-line operator ^ does not match the empty string at the beginning of string. If REG_NEWLINE was used when compiling preg the empty string immediately after a newline character will still be matched.
When this flag is used, the match-end-of-line operator $ does not match the empty string at the end of string. If REG_NEWLINE was used when compiling preg the empty string immediately before a newline character will still be matched. These flags are useful when different portions of a string are passed to regexec and the beginning or end of the partial string should not be interpreted as the beginning or end of a line.
If REG_NOSUB was used when compiling preg, nmatch is zero, or pmatch is NULL, then the pmatch argument is ignored. Otherwise, the submatches corresponding to the parenthesized subexpressions are filled in the elements of pmatch, which must be dimensioned to have at least nmatch elements.
The regmatch_t structure contains at least the following fields:
The length of a submatch can be computed by subtracting rm_eo and rm_so. If a parenthesized subexpression did not participate in a match, the rm_so and rm_eo fields for the corresponding pmatch element are set to -1. Note that when a multibyte character set such as UTF-8 is in effect, the submatch offsets are given as byte offsets, not character offsets. When matching wide character strings, the submatch offsets are always character offsets (and not byte offsets, for example).