Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



  regcmp(1)                           CLIX                           regcmp(1)



  NAME

    regcmp - Compiles regular expressions in a file

  SYNOPSIS

    regcmp [-] file ...

  FLAGS

    -   Places the output in file.c

  DESCRIPTION

    The regcmp command performs a function similar to regcmp() and, in most
    cases, precludes the need for calling regcmp() from C programs.  This
    saves on both execution time and program size.  The regcmp command
    compiles the regular expressions in file and places the output in file.i.
    If the - flag is used, the output will be placed in file.c.  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.  Thus, file.i files may be included (with #include)
    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) will apply the
    regular expression named abc to line.

  EXAMPLES

    name "([A-Za-z] [A-Za-z0-9_]*) $0"

    telno "\({0,1}([2-9] [01] [1-9]) $0\){0,1} *"
          "([2-9] [0-9] {2}) $1 [ -] {0,1}"
          "([0-9]{4})$2"

    In the C program that uses the regcmp output, regex(telno, line, area,
    exch, rest) will apply the regular expression named telno to line.

  RELATED INFORMATION

    Functions: regcmp()













  2/94 - Intergraph Corporation                                              1




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026