Open System Services Library Calls Reference Manual (G06.28+, H06.05+)
regex(3) OSS Library Calls Reference Manual
{m}{m,} {m,u} ||
Matches a given number of consecutive occurrences of the preceding regular |
expression. The {m,u} syntax matches from m to u occurrences where m and u |
are integers indicating the maximum and minimum number of occurrences, |
respectively. The {m} syntax matches exactly m occurrences while the {m,} syn- |
tax matches m or more occurences. |
(...)$n ||
Returns the value of the enclosed regular expression (subexpression). The value |
is stored in the location pointed to by the n+1th parameter in the se0, ... list |
where n is a single digit. If there are fewer than n parameters in this list, the |
behavior of regex() is undefined. A maximum of ten enclosed regular expres- |
sions are allowed. |
(...) ||
Groups a regular expression. A regular expression in parentheses can be fol- |
lowed by an operator like *, +, or {}. These operators have the same effect on a |
group regular expression as they do on a single character. |
All of these regular expression symbols are special characters. To use them as themselves, you |
must escape them by preceding them with a backslash. |
NOTES |
The behavior of this function in locales other than POSIX is undefined. |
This function can be called by native processes only. |
CAUTIONS |
Be sure to specify enough parameters in the se0, ... list to store the subexpressions being returned |
by (...)$n. If not enough parameters are specified or there is not enough space in the location |
pointed to by a given parameter to hold the returned subexpression, the results are undefined. |
RETURN VALUES
|
On successful completion, the regex() function returns a pointer to the next unmatched character |
in the string pointed to by subject. Otherwise, it returns a null pointer. |
ERRORS |
The regex() function does not return errors. |
RELATED INFORMATION
|
Functions: re_comp(3), re_exec(3), regcmp(3), regcomp(3).|
STANDARDS CONFORMANCE
|
The regcmp() function is defined in the XPG4 Version 2 specification. |
5−100 Hewlett-Packard Company 527187-007