PATMATCH(3)
π
PATMATCH(3) β SchilyΒ΄s LIBRARY FUNCTIONS πΈ
okay so bestie, welcome to patmatch(3) β the little function that checks a string for matches, and yes, we're gonna get into all of it. no cap. π«Ά
β¨ NAME β¨
patmatch() β checks string for matches π
π SYNOPSIS π
char *patmatch(pattern, aux, string, soff, slen, alt, state)
char *pattern;
int *aux;
char *string;
int soff;
int slen;
int alt;
int state[];
π¦ DESCRIPTION π¦
patmatch() uses the pattern matching information pattern and in addition aux and alt β which were previously set up by a call to patcompile(3) β to check string for a match. The length of the string is slen, and the starting index used for matching is soff. The string can also be terminated by a null byte. π
The state array is set up and used internally by patmatch and should have at least strlen(pattern) + 1 elements. periodt. π
π RETURNS π
Returns a NULL pointer if the string starting at the specified offset did not match the pattern. π
Any non-NULL return is a pointer to the first character of string after the part that matches. slay. β¨
π₯ SEE ALSO π₯
patcompile(3)for information onauxandalt.- And
match(1)for a description ot the regular expressions. iykyk π
π§ NOTES π§
The pattern matching functions are based on ones presented by Martin Richards in "A Compact Function for Regular Expression Pattern Matching", Software-Practice and Experience vol 9, 527-534 (1979). iconic source material, fr fr. ππ
xoxo, Joerg Schilling π«Ά Β· 2022/09/09 Β· SchilyΒ΄s LIBRARY FUNCTIONS π
π¦ where this page comes from
- opensuse-leap 16.0: libschily-devel-doc 2022.10.16-160000.2.2 Β· CDDL-1.0
- Copyright 1985,1995-2000 J. Schilling
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms