[Previous]
[Contents]
[Next]

regerror()

explain an error code from regcomp() or regexec()

Synopsis:

#include <regex.h>
size_t regerror(int err, const regex_t *reg,
                char *buf, size_t len )

Description:

The regerror() function provides a string explaining an error code returned by regcomp() or regexec(). The string is copied into buf for up to len characters. The parameter reg must be the regular expression that was provided in the failed call to regcomp() or regexec(). The err parameter must be the return value of a previous call to regcomp() or regexec().

Returns:

The number of characters copied into the string.

Examples:

See regcomp().

Classification:

POSIX 1003.2

Safety:
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

regcomp(), regexec(), regfree()


[Previous]
[Contents]
[Next]