


HISTMATCH(SFS3)   MISC. REFERENCE MANUAL PAGES    HISTMATCH(SFS3)



NAME
     histmatch - string matching on speech file histories

SYNOPSIS
     int     histmatch(exp,targ,ret0,ret1,...)
     char    *exp;             / match expression */
     char    *targ;            / target string */
     char    *ret0,*ret1,...   / returned sub-strings */


DESCRIPTION
     histmatch is a function to perform string matching on speech
     file histories as stored in item headers and processed using
     the label routines.  It returns a code  expressing  a  match
     between  a  match  expression exp, and a target string (item
     history) targ. The code is "1" for success, "0" for failure,
     and "-1" for an error on the string expression.

     The following string match  characters  are  currently  sup-
     ported in exp:

     ?          Match any single character (except line start and
                line end).

     *          Match zero or  more  characters  (including  line
                start and line end).

     %digit,%%  Match a string of characters up to ";", ",",  ")"
                and line end, and return the string in a function
                argument given after the target string. Thus "%0"
                will  return a substring into variable ret0, etc,
                "%%"  performs  matching  without   returning   a
                string.   Matched  substrings  are  further  con-
                strained to include equal  numbers  of  open  and
                close parentheses.

     any        Any other characters must match exactly.   Escape
                special characters with "\".

     The parameter "exp" may contain a single match expression or
     a sequence of expressions separated by "\033" (ESCAPE) char-
     acters. histmatch returns at the first matching expression.

VERSION/AUTHOR
     1.0 - Mark Huckvale.

SEE ALSO
     regex(3)

BUGS
     "exp" must match whole string.




SFS                     Last change: UCL                        1






HISTMATCH(SFS3)   MISC. REFERENCE MANUAL PAGES    HISTMATCH(SFS3)



SOURCE
     /ptemp/mark/sfs/libsfs/hmatch.c





















































SFS                     Last change: UCL                        2



