share/mk/: build-html: Don't build mbind.2 and set_mempolicy.2
[man-pages.git] / man3 / re_comp.3
blob51dd178216b0c4947bbd1e2714d03159ee046745
1 '\" t
2 .\" Copyright (C), 1995, Graeme W. Wilford. (Wilf.)
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .\" Wed Jun 14 16:10:28 BST 1995 Wilf. (G.Wilford@@ee.surrey.ac.uk)
7 .\"
8 .TH re_comp 3 (date) "Linux man-pages (unreleased)"
9 .SH NAME
10 re_comp, re_exec \- BSD regex functions
11 .SH LIBRARY
12 Standard C library
13 .RI ( libc ", " \-lc )
14 .SH SYNOPSIS
15 .nf
16 .B #define _REGEX_RE_COMP
17 .B #include <sys/types.h>
18 .B #include <regex.h>
20 .BI "[[deprecated]] char *re_comp(const char *" regex );
21 .BI "[[deprecated]] int re_exec(const char *" string );
22 .fi
23 .SH DESCRIPTION
24 .BR re_comp ()
25 is used to compile the null-terminated regular expression pointed to by
26 .IR regex .
27 The compiled pattern occupies a static area, the pattern buffer,
28 which is overwritten by subsequent use of
29 .BR re_comp ().
31 .I regex
32 is NULL,
33 no operation is performed and the pattern buffer's contents are not
34 altered.
36 .BR re_exec ()
37 is used to assess whether the null-terminated string pointed to by
38 .I string
39 matches the previously compiled
40 .IR regex .
41 .SH RETURN VALUE
42 .BR re_comp ()
43 returns NULL on successful compilation of
44 .I regex
45 otherwise it returns a pointer to an appropriate error message.
47 .BR re_exec ()
48 returns 1 for a successful match, zero for failure.
49 .SH ATTRIBUTES
50 For an explanation of the terms used in this section, see
51 .BR attributes (7).
52 .TS
53 allbox;
54 lbx lb lb
55 l l l.
56 Interface       Attribute       Value
58 .na
59 .nh
60 .BR re_comp (),
61 .BR re_exec ()
62 T}      Thread safety   MT-Unsafe
63 .TE
64 .SH STANDARDS
65 None.
66 .SH HISTORY
67 4.3BSD.
69 These functions are obsolete; the functions documented in
70 .BR regcomp (3)
71 should be used instead.
72 .SH SEE ALSO
73 .BR regcomp (3),
74 .BR regex (7),
75 GNU regex manual