re_comp, re_exec - BSD regex functions
char *re_comp(const char *regex);
int re_exec(const char *string);
() is used to compile the null-terminated regular expression
pointed to by regex
. The compiled pattern occupies a static area, the
pattern buffer, which is overwritten by subsequent use of re_comp
is NULL, no operation is performed and the pattern buffer's
contents are not altered.
() is used to assess whether the null-terminated string pointed to
matches the previously compiled regex
() returns NULL on successful compilation of regex
otherwise it returns a pointer to an appropriate error message.
() returns 1 for a successful match, zero for failure.
Multithreading (see pthreads(7))¶
() and re_exec
() functions are not thread-safe.
These functions are obsolete; the functions documented in regcomp(3)
should be used instead.
, GNU regex manual
This page is part of release 3.74 of the Linux man-pages
description of the project, information about reporting bugs, and the latest
version of this page, can be found at