summaryrefslogtreecommitdiff
path: root/include/ap_regex.h
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2017-10-02 21:57:26 +0000
committerYann Ylavic <ylavic@apache.org>2017-10-02 21:57:26 +0000
commit08ddf7ad0a257c1b27b5fdb8e32fcd40b4dbdad1 (patch)
treee851b15724aa86321e5aaae317ec8fa6bacd127a /include/ap_regex.h
parent5e90ede647f35d15935e8de5edcbe52af74473a1 (diff)
downloadhttpd-08ddf7ad0a257c1b27b5fdb8e32fcd40b4dbdad1.tar.gz
ap_expr: open string expressions to the <word>.
Introduces the syntax "%{:<word>:}", borrowed from the <var>'s one, and which likewise can be embedded anywhere in a string expression (the same reserved character ':' gets reused in an unambiguous manner). This allows the two types of expressions (boolean and string) to now share fully the same language set, namely: strings, lists, vars, regexes, backrefs, functions with multiple or complex arguments, and especially combinations thereof. Most of them were reserved to boolean expressions only, while complex string constructions can also benefit to, well, strings. The <word> construct allows that (say the syntax "%{:<word>:}" looks like a temporary variable constructed in a string). Since string expressions may now have to deal with lists (arrays), they also need a way to produce/extract strings from list and vice versa. This can be done with the new "join" and "split" operators, while the new substitution regexes (like "s/<pattern>/<substitute>/<flags>") may be used to manipulate strings in place. All this of course available for both string and boolean expressions. Tests and doc updates upcoming.. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1810605 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/ap_regex.h')
-rw-r--r--include/ap_regex.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/ap_regex.h b/include/ap_regex.h
index dbe9b24690..8f891fae98 100644
--- a/include/ap_regex.h
+++ b/include/ap_regex.h
@@ -76,6 +76,9 @@ extern "C" {
#define AP_REG_MULTI 0x10 /**< perl's /g (needs fixing) */
#define AP_REG_NOMEM 0x20 /**< nomem in our code */
#define AP_REG_DOTALL 0x40 /**< perl's /s flag */
+
+#define AP_REG_NOTEMPTY 0x080 /**< Empty match not valid */
+#define AP_REG_ANCHORED 0x100 /**< Match at the first position */
#define AP_REG_MATCH "MATCH_" /**< suggested prefix for ap_regname */