1re_comp(3)                            GNU                           re_comp(3)
2
3
4

NAME

6       re_comp, re_exec - BSD regex functions
7

SYNOPSIS

9       #define _REGEX_RE_COMP
10       #include <sys/types.h>
11       #include <regex.h>
12
13       char *re_comp(char *regex);
14       int re_exec(char *string);
15

DESCRIPTION

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

RETURN VALUE

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

CONFORMING TO

33       4.3BSD
34

NOTES

36       These  functions  are  obsolete; the functions documented in regcomp(3)
37       should be used instead.
38

SEE ALSO

40       regcomp(3), regex(7), GNU regex manual
41
42
43
44Linux                             1995-07-14                        re_comp(3)
Impressum