![]() |
![]() |
![]() |
Explain a regular expression error code
#include <regex.h> size_t regerror( int err, const regex_t * reg, char * buf, size_t len );
libc
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 reg parameter 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().
The number of characters copied into the string.
See regcomp().
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | Yes |
Signal handler | Yes |
Thread | Yes |
Henry Spencer. For copyright information, see Third-Party Copyright Notices in this reference.
regcomp(), regexec(), regfree()
![]() |
![]() |
![]() |