1RE_COMP(3) Linux Programmer's Manual RE_COMP(3)
2
3
4
6 re_comp, re_exec - BSD regex functions
7
9 #define _REGEX_RE_COMP
10 #include <sys/types.h>
11 #include <regex.h>
12
13 char *re_comp(char *regex);
14
15 int re_exec(char *string);
16
18 re_comp() is used to compile the null-terminated regular expression
19 pointed to by regex. The compiled pattern occupies a static area, the
20 pattern buffer, which is overwritten by subsequent use of re_comp().
21 If regex is NULL, no operation is performed and the pattern buffer's
22 contents are not altered.
23
24 re_exec() is used to assess whether the null-terminated string pointed
25 to by string matches the previously compiled regex.
26
28 re_comp() returns NULL on successful compilation of regex otherwise it
29 returns a pointer to an appropriate error message.
30
31 re_exec() returns 1 for a successful match, zero for failure.
32
34 Multithreading (see pthreads(7))
35 The re_comp() and re_exec() functions are not thread-safe.
36
38 4.3BSD.
39
41 These functions are obsolete; the functions documented in regcomp(3)
42 should be used instead.
43
45 regcomp(3), regex(7), GNU regex manual
46
48 This page is part of release 3.53 of the Linux man-pages project. A
49 description of the project, and information about reporting bugs, can
50 be found at http://www.kernel.org/doc/man-pages/.
51
52
53
54GNU 2013-06-21 RE_COMP(3)