24RCSIDH(regex_h,
"$Id: 830f93319248dc3ed8a37adc0ea271710ad812a9 $")
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>
43# ifdef HAVE_REGEX_PCRE2
44# define PCRE2_CODE_UNIT_WIDTH 8
55 pcre2_match_data *match_data;
83# define REG_EXTENDED (0)
94 regmatch_t *match_data;
114 unsigned int global : 1;
115 unsigned int ignore_case : 1;
116 unsigned int multiline : 1;
117 unsigned int dot_all : 1;
118 unsigned int unicode : 1;
120 unsigned int extended : 1;
123#define REGEX_FLAG_BUFF_SIZE 7
129#define FR_REGEX_SAFE_FOR ((uintptr_t)regex_exec)
136 ssize_t regex_compile(TALLOC_CTX *ctx, regex_t **
out,
char const *pattern,
size_t len,
137 fr_regex_flags_t
const *flags,
bool subcaptures,
bool runtime);
138int regex_exec(regex_t *preg,
char const *subject,
size_t len, fr_regmatch_t *regmatch) CC_HINT(
nonnull(1,2));
139#ifdef HAVE_REGEX_PCRE2
140int regex_substitute(TALLOC_CTX *ctx,
char **
out,
size_t max_out, regex_t *preg, fr_regex_flags_t
const *flags,
141 char const *subject,
size_t subject_len,
142 char const *replacement,
size_t replacement_len,
143 fr_regmatch_t *regmatch);
145uint32_t regex_subcapture_count(regex_t
const *preg);
146fr_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