1
0
mirror of https://github.com/apache/httpd.git synced 2025-07-29 09:01:18 +03:00

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
This commit is contained in:
Yann Ylavic
2018-02-15 17:53:24 +00:00
parent 4603595e1c
commit 2c21956d95
4 changed files with 118 additions and 0 deletions

View File

@ -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 */
@ -120,6 +122,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