соответствие регулярному выражению (regular expression matching)
Использование в приложениях (Application usage)
An application could use:
regerror(code,preg,(char *)NULL,(size_t)0)
to find out how big a buffer is needed for the generated string,
malloc() a buffer to hold the string, and then call regerror()
again to get the string. Alternatively, it could allocate a
fixed, static buffer that is big enough to hold most strings, and
then use malloc() to allocate a larger buffer if it finds that
this is too small.
To match a pattern as described in the Shell and Utilities volume
of POSIX.1‐2017, Section 2.13, Pattern Matching Notation, use the
fnmatch() function.