summaryrefslogtreecommitdiff
path: root/include/ap_regex.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ap_regex.h')
-rw-r--r--include/ap_regex.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/ap_regex.h b/include/ap_regex.h
index 5122154d..be41226b 100644
--- a/include/ap_regex.h
+++ b/include/ap_regex.h
@@ -77,6 +77,8 @@ extern "C" {
#define AP_REG_NOMEM 0x20 /* nomem in our code */
#define AP_REG_DOTALL 0x40 /* perl's /s flag */
+#define AP_REG_MATCH "MATCH_" /** suggested prefix for ap_regname */
+
/* Error values: */
enum {
AP_REG_ASSERT = 1, /** internal error ? */
@@ -149,6 +151,16 @@ AP_DECLARE(int) ap_regexec_len(const ap_regex_t *preg, const char *buff,
AP_DECLARE(apr_size_t) ap_regerror(int errcode, const ap_regex_t *preg,
char *errbuf, apr_size_t errbuf_size);
+/**
+ * Return an array of named regex backreferences
+ * @param preg The precompiled regex
+ * @param names The array to which the names will be added
+ * @param upper If non zero, uppercase the names
+ */
+AP_DECLARE(int) ap_regname(const ap_regex_t *preg,
+ apr_array_header_t *names, const char *prefix,
+ int upper);
+
/** Destroy a pre-compiled regex.
* @param preg The pre-compiled regex to free.
*/