[UP]


Manual Reference Pages  - amatch_ (3)

NAME

amatch_(3f) - [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 f93e6ac1-add0-49a3-9878-9fb22aed04f8 using man macros.