re_comp (ULTRIX) re_comp (ULTRIX)
NAME
re_comp, re_exec - Handle regular expressions
LIBRARY
Standard C Library (libc.a)
BSD COMPATIBILITY
The Digital UNIX system provides the libbsd.a library to allow you to
use library functions that are compatible with ULTRIX BSD library func‐
tions. To use the BSD functions, your program needs to be compiled with
-D_BSD and the -lbsd options.
Converts a string into an internal form suitable for pattern matching.
Returns 0 if the string was compiled successfully; otherwise, returns a
pointer to an error message. The regular expressions recognized are
described in the grep(1) reference page.
The re_exec() function compares the string parameter with the last
string passed to the re_comp() function. Returns 1 if the string
matches the last compiled regular expression. (The default returns 1
when the string fails to match the regular expression.) Returns 0 if
the string fails to match the last compiled regular expression. (The
default returns 0 if the string does match the regular expression.)
Returns -1 if the compiled regular expression is invalid (indicating an
internal error).
RELATED INFORMATION
Digital UNIX Functions:
re_comp(3), re_exec(3), regcomp(3), grep(1) delim off
re_comp (ULTRIX)