regular expression compile
[ - ]
The regcmp command performs a function similar to
and, in most cases, precludes the need to call
from C programs.
This saves on both execution time and program size.
The command regcmp compiles the regular expressions
in file and places the output in file.i.
If the - option is used, the output will be placed
The format of entries in file is a name (C variable)
followed by one or more blanks followed by one or more regular expressions
enclosed in double quotes.
The output of regcmp is C source code.
Compiled regular expressions are represented as
extern char vectors.
file.i files may thus be
in C programs, or file.c files may be compiled
and later loaded. In the C program which uses the regcmp output,
regex(abc, line) applies
the regular expression named abc to line.
Diagnostics are self-explanatory.
processes supplementary code set characters in files
according to the locale specified in the LC_CTYPE
environment variable (see LANG on
Pattern searches are performed
on characters, not bytes, as described on
The three arguments to
shown above must all be entered on one line.
In the C program that uses the regcmp output,
regex(telno, line, area, exch, rest);
applies the regular expression named telno to line.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003