соответствие регулярному выражению (regular expression matching)
Возвращаемое значение (Return value)
Upon successful completion, the regcomp() function shall return
0. Otherwise, it shall return an integer value indicating an
error as described in <regex.h>, and the content of preg is
undefined. If a code is returned, the interpretation shall be as
given in <regex.h>.
If regcomp() detects an invalid RE, it may return REG_BADPAT, or
it may return one of the error codes that more precisely
describes the error.
Upon successful completion, the regexec() function shall return
0. Otherwise, it shall return REG_NOMATCH to indicate no match.
Upon successful completion, the regerror() function shall return
the number of bytes needed to hold the entire generated string,
including the null termination. If the return value is greater
than errbuf_size, the string returned in the buffer pointed to by
errbuf has been truncated.
The regfree() function shall not return a value.