summaryrefslogtreecommitdiff
path: root/include/ap_regex.h
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2018-02-15 17:53:24 +0000
committerYann Ylavic <ylavic@apache.org>2018-02-15 17:53:24 +0000
commit2c21956d95fae9812e6307aff6a021eb2cb63898 (patch)
tree96300fbb22f454bd8e51969290024ad6e5a8ebc0 /include/ap_regex.h
parent4603595e1c07d0ad659f020bbd5071e48c955d91 (diff)
downloadhttpd-2c21956d95fae9812e6307aff6a021eb2cb63898.tar.gz
regex: Allow to configure global/default options for regexes.
Like caseless matching or extended format, which may be useful as default behaviour the whole configuration. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1824339 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/ap_regex.h')
-rw-r--r--include/ap_regex.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/ap_regex.h b/include/ap_regex.h
index 8f891fae98..22c0b0d013 100644
--- a/include/ap_regex.h
+++ b/include/ap_regex.h
@@ -80,6 +80,8 @@ extern "C" {
#define AP_REG_NOTEMPTY 0x080 /**< Empty match not valid */
#define AP_REG_ANCHORED 0x100 /**< Match at the first position */
+#define AP_REG_DOLLAR_ENDONLY 0x200 /**< '$' matches at end of subject string only */
+
#define AP_REG_MATCH "MATCH_" /**< suggested prefix for ap_regname */
/* Arguments for ap_pcre_version_string */
@@ -121,6 +123,26 @@ typedef struct {
AP_DECLARE(const char *) ap_pcre_version_string(int which);
/**
+ * Get default compile flags
+ * @return Bitwise OR of AP_REG_* flags
+ */
+AP_DECLARE(int) ap_regcomp_get_default_cflags(void);
+
+/**
+ * Set default compile flags
+ * @param cflags Bitwise OR of AP_REG_* flags
+ */
+AP_DECLARE(void) ap_regcomp_set_default_cflags(int cflags);
+
+/**
+ * Get the AP_REG_* corresponding to the string.
+ * @param name The name (i.e. AP_REG_<name>)
+ * @return The AP_REG_*, or zero if the string is unknown
+ *
+ */
+AP_DECLARE(int) ap_regcomp_default_cflag_by_name(const char *name);
+
+/**
* Compile a regular expression.
* @param preg Returned compiled regex
* @param regex The regular expression string