4 /* make the REG_* constants available */
12 #define MAX_REGEX_SUB 10
14 typedef struct Regex Regex
;
15 typedef Filerange RegexMatch
;
17 Regex
*text_regex_new(void);
18 int text_regex_compile(Regex
*, const char *pattern
, int cflags
);
19 size_t text_regex_nsub(Regex
*);
20 void text_regex_free(Regex
*);
21 int text_regex_match(Regex
*, const char *data
, int eflags
);
22 int text_search_range_forward(Text
*, size_t pos
, size_t len
, Regex
*r
, size_t nmatch
, RegexMatch pmatch
[], int eflags
);
23 int text_search_range_backward(Text
*, size_t pos
, size_t len
, Regex
*r
, size_t nmatch
, RegexMatch pmatch
[], int eflags
);