[UP]


Manual Reference Pages  - amatch (3)

NAME

amatch - [M_match] - look for pattern matching regular expression; returns its location

CONTENTS

Synopsis
Description
Options
Returns
Example
See Also
Author
Reference
License

SYNOPSIS

loc = amatch (line, from, pat, tagbeg, tagend)

       character line(ARB), pat(MAXPAT)
       integer from
       integer tagbeg(10), tagend(10)
       (element "i + 1" returns start or end, respectively,
       of "i"th tagged subpattern)
       integer loc returns location/0
       matched; if no match, loc is returned as 0

DESCRIPTION

AMATCH(3f)
  scans ’line’ starting at location ’from’, looking for
a pattern which matches the regular expression coded in ’pat’. If the pattern is found, its starting location in line is
returned. If the pattern is not found, AMATCH(3f)
  returns 0.
The regular expression in ’pat’ must have been previously encoded by ’getpat’ or ’makpat’. (For a complete description of regular expressions, see the writeup on the editor.)
AMATCH(3f)
  is a special-purpose version of match, which should be used in most cases.

OPTIONS

RETURNS

EXAMPLE

SEE ALSO

match, getpat, makpat

AUTHOR

John S. Urban

REFERENCE

"Software Tools" by Kernighan and Plauger , 1976

LICENSE

Public Domain


amatch (3) March 11, 2021
Generated by manServer 1.08 from 86b65a82-04d5-49a7-bd8e-155cdeb46f12 using man macros.