int histmatch(exp,targ,ret0,ret1,...) char *exp; /* match expression */ char *targ; /* target string */ char *ret0,*ret1,... /* returned sub-strings */
The following string match characters are currently supported 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 constrained 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) characters. histmatch returns at the first matching expression.