.TH regcomp() "" "" "Regular-Expression Function (libc)"
.PC "Compile a regular expression into a structure"
.B "#include <regexp.h>"
\fBregexp *regcomp(\fIexpression\^\fB)\fR
\fBchar *\fIexpression\^\fB;\fR
.PP
Function
.B regcomp()
compiles
.I expression
into a structure of type
.BR regexp ,
and returns a pointer to it.
For details on the structure
.BR regexp ,
see the Lexicon entry for
.BR regexp.h .
.I expression
must be a regular expression; the rules that define a regular expression are
described in the Lexicon entry
.BR regexp.h .
.SH "See Also"
.Xr "libc," libc
.Xr "regexp.h" regexp.h
.SH Notes
.B regcomp()
calls
.B malloc()
to allocate the memory that holds the structure it creates.
To free this structure, your program must call
.BR free() .
