]>
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 | .\" | |
8660ef9f | 27 | .TH RE_COMP 3 2014-05-28 "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> | |
36 | .sp | |
5ceebb54 | 37 | .BI "char *re_comp(const char *" regex ); |
5895e7eb | 38 | .sp |
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. | |
52 | ||
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. | |
63 | ||
e511ffb6 | 64 | .BR re_exec () |
fea681da | 65 | returns 1 for a successful match, zero for failure. |
dc01ee87 PH |
66 | .SH ATTRIBUTES |
67 | .SS Multithreading (see pthreads(7)) | |
68 | The | |
69 | .BR re_comp () | |
70 | and | |
71 | .BR re_exec () | |
72 | functions are not thread-safe. | |
47297adb | 73 | .SH CONFORMING TO |
44a2c328 | 74 | 4.3BSD. |
82708f9a | 75 | .SH NOTES |
c13182ef | 76 | These functions are obsolete; the functions documented in |
82708f9a MK |
77 | .BR regcomp (3) |
78 | should be used instead. | |
47297adb | 79 | .SH SEE ALSO |
82708f9a MK |
80 | .BR regcomp (3), |
81 | .BR regex (7), | |
82 | GNU regex manual |