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