pmatch(9) - NetBSD Manual Pages

Command: Section: Arch: Collection:  
PMATCH(9)              NetBSD Kernel Developer's Manual              PMATCH(9)

pmatch -- performs pattern matching on strings
#include <sys/systm.h> int pmatch(const char *string, const char *pattern, const char **estr);
Extract substring matching pattern from string. If not NULL, estr points to the end of the longest exact or substring match. pmatch() uses the following metacharacters: ? match any single character. * match any character 0 or more times. [ define a range of characters that will match. The range is defined by 2 characters separated by a `-'. The range definition has to end with a `]'. A `^' following the `[' will negate the range.
pmatch() will return 2 for an exact match, 1 for a substring match, 0 for no match and -1 if an error occurs. NetBSD 10.99 October 12, 2003 NetBSD 10.99
Powered by man-cgi (2024-03-20). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.