Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
Guardian Native C Library Calls (n - r) regcomp(3)
NAME
regcomp, regerror, regexec, regfree - Perform regular expression matching
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
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 <sys/types.h>
#include <regex.h>
int regcomp(
regex_t *preg,
const char *pattern,
int cflags);
size_t regerror(
int errcode,
const regex_t preg,
char *errbuf,
size_t errbuf_size);
int regexec(
const regex_t *preg,
const char *string,
size_t nmatch,
regmatch_t *pmatch,
int eflags);
void regfree(
regex_t *preg);
PARAMETERS
cflags Contains the bitwise inclusive OR of flags for regcomp().
The cflags parameter is the bitwise inclusive OR of zero or more of the following
flags. These flags are defined in the /usr/include/regex.h file.
REG_EXTENDED
Uses extended regular expressions.
REG_ICASE Ignores case in match.
REG_NOSUB If this flag is not set, the regcomp() function sets the
preg.re_nsub field to the number of parenthetic expressions
found in the pattern parameter. Otherwise, a subexpression will
result in an error.
REG_NEWLINE
Treats newline as a special character marking the end and begin-
ning of lines.
527192-018 Hewlett-Packard Company 5−97