#define REG_ICASE 1
Flag to regcomp to enable case insensitive matching.
#define REG_NEWLINE 2
Flag to regcomp to enable matching ^ and $ on newlines.
#define REG_NOTBOL 4
Flag to regexec to indicate that the string does not start at the beginning of a line.
#define REG_RUNAWAY 8
Flag to regexec to detect runaway backtracking.
#define REG_MAXSUB 16
Maximum number of sub expression that can be captured. If you redefine REG_MAXSUB, you must make sure both the calling code and the regexp.c compilation unit use the same value!
typedef struct fz_regex fz_regex
Opaque datatype for a compiled regular expression program.
struct fz_regmatch {
int nsub;
struct {
const char *sp;
const char *ep;
} sub[REG_MAXSUB];
}
Struct holding the results of a successful pattern match.
struct fz_regex *
fz_regcomp (
fz_context *ctx,
const char *pattern,
int cflags
)
Compile regular expression program.
int
fz_regexec (
fz_context *ctx,
struct fz_regex *prog,
const char *string,
struct fz_regmatch *sub,
int eflags
)
Match regular expression program against a text string.
void
fz_regfree (
fz_context *ctx,
struct fz_regex *prog
)
Free regular exppression program.