1re_comp(3)                 Library Functions Manual                 re_comp(3)
2
3
4

NAME

6       re_comp, re_exec - BSD regex functions
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

12       #define _REGEX_RE_COMP
13       #include <sys/types.h>
14       #include <regex.h>
15
16       [[deprecated]] char *re_comp(const char *regex);
17       [[deprecated]] int re_exec(const char *string);
18

DESCRIPTION

20       re_comp()  is  used  to  compile the null-terminated regular expression
21       pointed to by regex.  The compiled pattern occupies a static area,  the
22       pattern  buffer,  which  is overwritten by subsequent use of re_comp().
23       If regex is NULL, no operation is performed and  the  pattern  buffer's
24       contents are not altered.
25
26       re_exec()  is used to assess whether the null-terminated string pointed
27       to by string matches the previously compiled regex.
28

RETURN VALUE

30       re_comp() returns NULL on successful compilation of regex otherwise  it
31       returns a pointer to an appropriate error message.
32
33       re_exec() returns 1 for a successful match, zero for failure.
34

ATTRIBUTES

36       For  an  explanation  of  the  terms  used  in  this  section,  see at‐
37       tributes(7).
38
39       ┌──────────────────────────────────────────┬───────────────┬───────────┐
40Interface                                 Attribute     Value     
41       ├──────────────────────────────────────────┼───────────────┼───────────┤
42re_comp(), re_exec()                      │ Thread safety │ MT-Unsafe │
43       └──────────────────────────────────────────┴───────────────┴───────────┘
44

STANDARDS

46       None.
47

HISTORY

49       4.3BSD.
50
51       These functions are obsolete; the functions  documented  in  regcomp(3)
52       should be used instead.
53

SEE ALSO

55       regcomp(3), regex(7), GNU regex manual
56
57
58
59Linux man-pages 6.05              2023-07-20                        re_comp(3)
Impressum