Open System Services Library Calls Reference Manual (G06.28+, H06.05+)
regcomp(3) OSS Library Calls Reference Manual
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 native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL |
H-series OSS processes: /G/system/zdllnnn/zcrtldll |
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. |
5−90 Hewlett-Packard Company 527187-007