regcmp(1) regcmp(1)NAME regcmp - compiles regular expressions with a file SYNOPSIS regcmp [-] file... ARGUMENTS - Places the output in a file suffixed .c. file Specifies the file to be compiled. DESCRIPTION regcmp, in most cases, precludes the need for calling regcmp 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. The format of entries in file is a name (C variable) followed by one or more blanks followed by a regular expression 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 included into C programs, or file.c files may be compiled and later loaded. In the C program which uses the regcmp output, regex(abc,line) will apply the regular expression named abc to line. The status messages for this command are self- explanatory. EXAMPLES This C program: name``([A-Za-z][A-Za-z0-9_]*)$0'' telno ``,1}([2-9][01][1-9])$0){0,1} *'' ``([2-9][0-9]{2})$1[ -]{0,1}'' ``([0-9]{4})$2'' that uses the regcmp output regex(telno, line, area, exch, rest) will apply the regular expression named telno to line. FILES /usr/bin/regcmp Executable file January 1992 1
regcmp(1) regcmp(1)SEE ALSO cc(1), lex(1) regcmp(3X) in A/UX Programmer's Reference 2 January 1992