1 .\" Copyright (C), 1995, Graeme W. Wilford. (Wilf.)
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\" Wed Jun 14 16:10:28 BST 1995 Wilf. (G.Wilford@@ee.surrey.ac.uk)
7 .TH RE_COMP 3 2021-03-22 "Linux man-pages (unreleased)" "Linux Programmer's Manual"
9 re_comp, re_exec \- BSD regex functions
12 .RI ( libc ", " \-lc )
15 .B #define _REGEX_RE_COMP
16 .B #include <sys/types.h>
19 .BI "char *re_comp(const char *" regex );
20 .BI "int re_exec(const char *" string );
24 is used to compile the null-terminated regular expression pointed to by
26 The compiled pattern occupies a static area, the pattern buffer,
27 which is overwritten by subsequent use of
32 no operation is performed and the pattern buffer's contents are not
36 is used to assess whether the null-terminated string pointed to by
38 matches the previously compiled
42 returns NULL on successful compilation of
44 otherwise it returns a pointer to an appropriate error message.
47 returns 1 for a successful match, zero for failure.
49 For an explanation of the terms used in this section, see
57 Interface Attribute Value
61 T} Thread safety MT-Unsafe
69 These functions are obsolete; the functions documented in
71 should be used instead.