Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ regcmp(1) — svr4 — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

regcmp(3G)



REGCMP(1-SVR4)      RISC/os Reference Manual       REGCMP(1-SVR4)



NAME
     regcmp - regular expression compile

SYNOPSIS
     regcmp [-] file...

DESCRIPTION
     The regcmp command performs a function similar to regcmp(3G)
     and, in most cases, precludes the need for calling regcmp
     from C programs.  Bypassing regcmp saves on both execution
     time and program size.  The command regcmp compiles the reg-
     ular expressions in file and places the output in file.i.
     If the - option is used, the output is placed in file.c.
     The format of entries in file is a name (C variable) fol-
     lowed 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 #included in C programs, or file.c files may be compiled
     and later loaded.  In the C program that uses the regcmp
     output, regex(abc,line) applies the regular expression named
     abc to line.  Diagnostics are self-explanatory.

INTERNATIONAL FUNCTIONALITY
     regcmp complies regular expressions based on characters, not
     bytes, as regcmp(3G) in the System V Release 4.0
     Programmer's Reference Manual does.  Regular expression in
     the file can include characters from supplementary code
     sets.

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

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

     The three arguments to telno 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.

SEE ALSO
     regcmp(3G).







                        Printed 11/19/92                   Page 1



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