Документация к библиотекам Wiki
Advertisement

Устаревшая функция извлечения информации о шаблоне[]

int pcre_info(const pcre *code, int *optptr, int *firstcharptr);

The pcre_info() function is now obsolete because its interface is too restrictive to return all the available data about a compiled pattern. New programs should use pcre_fullinfo() instead. The yield of pcre_info() is the number of capturing subpatterns, or one of the fol- lowing negative numbers:

 PCRE_ERROR_NULL       the argument code was NULL
 PCRE_ERROR_BADMAGIC   the "magic number" was not found

If the optptr argument is not NULL, a copy of the options with which the pattern was compiled is placed in the integer it points to (see PCRE_INFO_OPTIONS above).

If the pattern is not anchored and the firstcharptr argument is not NULL, it is used to pass back information about the first character of any matched string (see PCRE_INFO_FIRSTBYTE above).

Advertisement