24 RCSIDH(regex_h,
"$Id: 4285d25c830c41f25bd59b5fb13783806d926fe9 $")
30 #include <freeradius-devel/build.h>
31 #include <freeradius-devel/missing.h>
32 #include <freeradius-devel/util/sbuff.h>
33 #include <freeradius-devel/util/talloc.h>
34 #include <freeradius-devel/util/value.h>
45 # ifdef HAVE_REGEX_PCRE2
46 # define PCRE2_CODE_UNIT_WIDTH 8
57 pcre2_match_data *match_data;
78 # elif defined(HAVE_REGEX_PCRE)
84 # ifndef PCRE_STUDY_JIT_COMPILE
85 # define PCRE_STUDY_JIT_COMPILE 0
101 regmatch_t *match_data;
129 # ifndef REG_EXTENDED
130 # define REG_EXTENDED (0)
134 # define REG_NOSUB (0)
141 regmatch_t *match_data;
170 #define REGEX_FLAG_BUFF_SIZE 7
177 ssize_t regex_compile(TALLOC_CTX *ctx, regex_t **
out,
char const *pattern,
size_t len,
178 fr_regex_flags_t
const *flags,
bool subcaptures,
bool runtime);
179 int regex_exec(regex_t *preg,
char const *subject,
size_t len, fr_regmatch_t *regmatch) CC_HINT(
nonnull(1,2));
180 #ifdef HAVE_REGEX_PCRE2
181 int regex_substitute(TALLOC_CTX *ctx,
char **
out,
size_t max_out, regex_t *preg, fr_regex_flags_t
const *flags,
182 char const *subject,
size_t subject_len,
183 char const *replacement,
size_t replacement_len,
184 fr_regmatch_t *regmatch);
186 uint32_t regex_subcapture_count(regex_t
const *preg);
187 fr_regmatch_t *regex_match_data_alloc(TALLOC_CTX *ctx,
uint32_t count);
Set of terminal elements.
int fr_regex_cmp_op(fr_token_t op, fr_value_box_t const *a, fr_value_box_t const *b)
Compare two boxes using an operator.
static size_t char ** out