Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

re_exec(3) OSS Library Calls Reference Manual
NAME
re_exec - Executes regular expressions
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZSTFNSRL
G-series native OSS processes: /G/system/sysnn/zstfnsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <re_comp.h>
int re_exec(
const char *string);
PARAMETERS
string Is a pointer to the string that the re_exec( ) function searches for matches to the
last compiled regular expression.
DESCRIPTION
The re_exec() function compares the string pointed to by the string parameter with the last reg-
ular expression compiled by the re_comp( ) function.
The re_exec() function supports simple regular expressions.
The following one-character regular expression strings match a single character:
1. An ordinary character (not one of the special characters discussed in paragraph 2) is a
one-character regular expression string that matches itself.
2. A backslash (\) followed by a special character is one-character regular expression string
that matches a literal appearance of that character itself. Some special characters are
always special characters while others are only special in certain circumstances.
Characters that are special when they appear anywhere but inside square brack-
ets ([ ]) are "." (period), "*" (asterisk), "[" (left square bracket), and "\"
(backslash).
The "ˆ" character (circumflex) is only special when it appears at the beginning of
a regular expression string or when it is the first character with a set of square
brackets.
The "$" character (dollar sign) is only special when it appears at the very end of
a regular expression string.
Any character used to delimit a regular expression string is special for that regu-
lar expression string.
3. A period (.) is a one-character regular expression string that matches any one single char-
acter except newline.
4. A set of square brackets containing a non-empty string of characters is a one-character
regular expression string that matches any one character found within the brackets.
When the first character of the bracketed string is a "ˆ" (caret or circumflex), the one-
character regular expression string matches any one character except the new-line and
those characters following the "ˆ" in the bracketed string.
Within the bracketed string, a minus sign (-) can be used to specify a range of
5158 Hewlett-Packard Company 527187-017