From 0e26d4843d7f993547e3d0acf5b91c5bb29ee743 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 1 Dec 2015 18:17:55 +0000 Subject: Add routines to get count of captures and backrefs --- src/libutil/regexp.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/libutil/regexp.h') diff --git a/src/libutil/regexp.h b/src/libutil/regexp.h index 1301e5dd9..2c33f780d 100644 --- a/src/libutil/regexp.h +++ b/src/libutil/regexp.h @@ -110,6 +110,16 @@ gpointer rspamd_regexp_get_id (rspamd_regexp_t *re); */ const char* rspamd_regexp_get_pattern (rspamd_regexp_t *re); +/** + * Returns number of backreferences in a regexp + */ +gint rspamd_regexp_get_nbackrefs (rspamd_regexp_t *re); + +/** + * Returns number of capture groups in a regexp + */ +gint rspamd_regexp_get_ncaptures (rspamd_regexp_t *re); + /** * Create new regexp cache * @return -- cgit v1.2.3