77 # include <pcreposix.h> 82 #if defined(HAVE_REGEX) || defined(HAVE_PCRE) 89 #define REGEX_MAX_SUB_MATCH 10 95 void gw_regex_destroy(regex_t *preg);
103 regex_t *gw_regex_comp_real(
const Octstr *pattern,
int cflags,
const char *
file,
104 long line,
const char *func);
105 #define gw_regex_comp(pattern, cflags) \ 106 gw_regex_comp_real(pattern, cflags, __FILE__, __LINE__, __func__) 113 int gw_regex_exec_real(
const regex_t *preg,
const Octstr *
string,
size_t nmatch,
114 regmatch_t pmatch[],
int eflags,
const char *
file,
long line,
116 #define gw_regex_exec(preg, string, nmatch, pmatch, eflags) \ 117 gw_regex_exec_real(preg, string, nmatch, pmatch, eflags, \ 118 __FILE__, __LINE__, __func__) 125 Octstr *gw_regex_error(
int errcode,
const regex_t *preg);
141 char *gw_regex_sub(
const char *input,
const char *source,
142 size_t nmatch, regmatch_t pmatch[]);
151 int gw_regex_match_real(
const Octstr *re,
const Octstr *os,
const char *
file,
152 long line,
const char *func);
153 #define gw_regex_match(re, os) \ 154 gw_regex_match_real(re, os, __FILE__, __LINE__, __func__) 162 int gw_regex_match_pre_real(
const regex_t *preg,
const Octstr *os,
const char *
file,
163 long line,
const char *func);
164 #define gw_regex_match_pre(preg, os) \ 165 gw_regex_match_pre_real(preg, os, __FILE__, __LINE__, __func__) 178 const char *
file,
long line,
const char *func);
179 #define gw_regex_subst(re, os, rule) \ 180 gw_regex_subst_real(re, os, rule, __FILE__, __LINE__, __func__) 188 Octstr *gw_regex_subst_pre_real(
const regex_t *preg,
const Octstr *os,
const Octstr *rule,
189 const char *
file,
long line,
const char *func);
190 #define gw_regex_subst_pre(preg, os, rule) \ 191 gw_regex_subst_pre_real(preg, os, rule, __FILE__, __LINE__, __func__)