24RCSIDH(regex_h,
"$Id: d1674f45ae7a13eb0e2d970156d9073de36b73f5 $")
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;
130# define REG_EXTENDED (0)
134# define REG_NOSUB (0)
141 regmatch_t *match_data;
170#define REGEX_FLAG_BUFF_SIZE 7
174#define FR_REGEX_SAFE_FOR ((uintptr_t)regex_exec)
181 ssize_t regex_compile(TALLOC_CTX *ctx, regex_t **
out,
char const *pattern,
size_t len,
182 fr_regex_flags_t
const *flags,
bool subcaptures,
bool runtime);
183int regex_exec(regex_t *preg,
char const *subject,
size_t len, fr_regmatch_t *regmatch) CC_HINT(
nonnull(1,2));
184#ifdef HAVE_REGEX_PCRE2
185int regex_substitute(TALLOC_CTX *ctx,
char **
out,
size_t max_out, regex_t *preg, fr_regex_flags_t
const *flags,
186 char const *subject,
size_t subject_len,
187 char const *replacement,
size_t replacement_len,
188 fr_regmatch_t *regmatch);
190uint32_t regex_subcapture_count(regex_t
const *preg);
191fr_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