summaryrefslogtreecommitdiffstats
path: root/man3/re_comp.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:40:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:40:15 +0000
commit399644e47874bff147afb19c89228901ac39340e (patch)
tree1c4c0b733f4c16b5783b41bebb19194a9ef62ad1 /man3/re_comp.3
parentInitial commit. (diff)
downloadmanpages-upstream/6.05.01.tar.xz
manpages-upstream/6.05.01.zip
Adding upstream version 6.05.01.upstream/6.05.01
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man3/re_comp.3')
-rw-r--r--man3/re_comp.376
1 files changed, 76 insertions, 0 deletions
diff --git a/man3/re_comp.3 b/man3/re_comp.3
new file mode 100644
index 0000000..3cb4450
--- /dev/null
+++ b/man3/re_comp.3
@@ -0,0 +1,76 @@
+'\" t
+.\" Copyright (C), 1995, Graeme W. Wilford. (Wilf.)
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.\" Wed Jun 14 16:10:28 BST 1995 Wilf. (G.Wilford@@ee.surrey.ac.uk)
+.\"
+.TH re_comp 3 2023-07-20 "Linux man-pages 6.05.01"
+.SH NAME
+re_comp, re_exec \- BSD regex functions
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
+.SH SYNOPSIS
+.nf
+.B #define _REGEX_RE_COMP
+.B #include <sys/types.h>
+.B #include <regex.h>
+.PP
+.BI "[[deprecated]] char *re_comp(const char *" regex );
+.BI "[[deprecated]] int re_exec(const char *" string );
+.fi
+.SH DESCRIPTION
+.BR re_comp ()
+is used to compile the null-terminated regular expression pointed to by
+.IR regex .
+The compiled pattern occupies a static area, the pattern buffer,
+which is overwritten by subsequent use of
+.BR re_comp ().
+If
+.I regex
+is NULL,
+no operation is performed and the pattern buffer's contents are not
+altered.
+.PP
+.BR re_exec ()
+is used to assess whether the null-terminated string pointed to by
+.I string
+matches the previously compiled
+.IR regex .
+.SH RETURN VALUE
+.BR re_comp ()
+returns NULL on successful compilation of
+.I regex
+otherwise it returns a pointer to an appropriate error message.
+.PP
+.BR re_exec ()
+returns 1 for a successful match, zero for failure.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbx lb lb
+l l l.
+Interface Attribute Value
+T{
+.na
+.nh
+.BR re_comp (),
+.BR re_exec ()
+T} Thread safety MT-Unsafe
+.TE
+.sp 1
+.SH STANDARDS
+None.
+.SH HISTORY
+4.3BSD.
+.PP
+These functions are obsolete; the functions documented in
+.BR regcomp (3)
+should be used instead.
+.SH SEE ALSO
+.BR regcomp (3),
+.BR regex (7),
+GNU regex manual