Sword pcre库函数学习二

9.pcre_free_substring_list
  原型:
    #include <pcre.h>
    void pcre_free_substring_list(const char **stringptr);
  功能:释放由pcre_get_substring_list申请的内存空间
  参数:
    stringptr   指向字符串数组的指针
10.pcre_fullinfo
   原型:
     #include <pcre.h>
     int pcre_fullinfo(const pcre *code, const pcre_extra *extra, int what, void *where);
   功能:返回编译出来的模式的信息
   参数:
     code   编译好的模式
     extra  pcre_study()的返回值,或者NULL
     what   什么信息
     where  存储位置
11.pcre_get_named_substring
   原型:
     #include <pcre.h>
     int pcre_get_named_substring(const pcre *code, const char *subject, int *ovector, int stringcount, const char *stringname, 
                                  const char **stringptr);
   功能:根据编号获取捕获的字串
   参数:
     code    成功匹配的模式
     subject 匹配的串
     ovector pcre_exec()使用的偏移向量
     stringcount pcre_exec()的返回值
     stringname  捕获字串的名字
     stringptr   存放结果的字符串指针
12.pcre_get_stringnumber
  原型:
    #include <pcre.h>
    int pcre_get_stringnumber(const pcre *code, const char *name);
  功能:根据命名捕获的名字获取对应的编号
  参数:
    code    成功匹配的模式
    name    捕获名字
13.pcre_get_substring
   原型:
     #include <pcre.h>
     int pcre_get_substring(const char *subject, int *ovector, int stringcount, int stringnumber, const char **stringptr);
   功能:获取匹配的子串
   参数:
     subject  成功匹配的串
     ovector  pcre_exec()使用的偏移向量
     stringcount pcre_exec()的返回值
     stringnumber  获取的字符串编号
     stringptr    字符串指针
原文地址:https://www.cnblogs.com/zhanggaofeng/p/9733217.html