]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (C), 1995, Graeme W. Wilford. (Wilf.) |
2 | .\" | |
93015253 | 3 | .\" %%%LICENSE_START(VERBATIM) |
fea681da MK |
4 | .\" Permission is granted to make and distribute verbatim copies of this |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
12 | .\" | |
13 | .\" Since the Linux kernel and libraries are constantly changing, this | |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
20 | .\" | |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by | |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
fea681da MK |
24 | .\" |
25 | .\" Wed Jun 14 16:10:28 BST 1995 Wilf. (G.Wilford@@ee.surrey.ac.uk) | |
26 | .\" | |
4b8c67d9 | 27 | .TH RE_COMP 3 2017-09-15 "GNU" "Linux Programmer's Manual" |
fea681da MK |
28 | .SH NAME |
29 | re_comp, re_exec \- BSD regex functions | |
30 | .SH SYNOPSIS | |
3bb7c732 MK |
31 | .B #define _REGEX_RE_COMP |
32 | .br | |
fea681da MK |
33 | .B #include <sys/types.h> |
34 | .br | |
35 | .B #include <regex.h> | |
68e4db0a | 36 | .PP |
5ceebb54 | 37 | .BI "char *re_comp(const char *" regex ); |
68e4db0a | 38 | .PP |
5ceebb54 | 39 | .BI "int re_exec(const char *" string ); |
fea681da | 40 | .SH DESCRIPTION |
e511ffb6 | 41 | .BR re_comp () |
fea681da MK |
42 | is used to compile the null-terminated regular expression pointed to by |
43 | .IR regex . | |
44 | The compiled pattern occupies a static area, the pattern buffer, | |
45 | which is overwritten by subsequent use of | |
e511ffb6 | 46 | .BR re_comp (). |
fea681da MK |
47 | If |
48 | .I regex | |
8478ee02 | 49 | is NULL, |
fea681da MK |
50 | no operation is performed and the pattern buffer's contents are not |
51 | altered. | |
847e0d88 | 52 | .PP |
e511ffb6 | 53 | .BR re_exec () |
fea681da MK |
54 | is used to assess whether the null-terminated string pointed to by |
55 | .I string | |
56 | matches the previously compiled | |
57 | .IR regex . | |
47297adb | 58 | .SH RETURN VALUE |
e511ffb6 | 59 | .BR re_comp () |
8478ee02 | 60 | returns NULL on successful compilation of |
fea681da MK |
61 | .I regex |
62 | otherwise it returns a pointer to an appropriate error message. | |
847e0d88 | 63 | .PP |
e511ffb6 | 64 | .BR re_exec () |
fea681da | 65 | returns 1 for a successful match, zero for failure. |
dc01ee87 | 66 | .SH ATTRIBUTES |
d560f1c8 PH |
67 | For an explanation of the terms used in this section, see |
68 | .BR attributes (7). | |
69 | .TS | |
70 | allbox; | |
71 | lbw20 lb lb | |
72 | l l l. | |
73 | Interface Attribute Value | |
74 | T{ | |
75 | .BR re_comp (), | |
dc01ee87 | 76 | .BR re_exec () |
d560f1c8 PH |
77 | T} Thread safety MT-Unsafe |
78 | .TE | |
47297adb | 79 | .SH CONFORMING TO |
44a2c328 | 80 | 4.3BSD. |
82708f9a | 81 | .SH NOTES |
c13182ef | 82 | These functions are obsolete; the functions documented in |
82708f9a MK |
83 | .BR regcomp (3) |
84 | should be used instead. | |
47297adb | 85 | .SH SEE ALSO |
82708f9a MK |
86 | .BR regcomp (3), |
87 | .BR regex (7), | |
88 | GNU regex manual |