amatch_(3f) - [M_match] - look for pattern matching regular expression; returns its location
Synopsis
Description
Options
Returns
Example
See Also
Author
Reference
License
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
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.
match, getpat_, makpat_
John S. Urban
"Software Tools" by Kernighan and Plauger , 1976
Public Domain
amatch_ (3) | March 11, 2021 |