summaryrefslogtreecommitdiffstats
path: root/template.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-05-29 12:48:15 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-05-29 12:48:15 +0200
commit99f18190a1f911224d45ca61706ae3fbc9ad7a80 (patch)
treebd711a9f2c5d44aae187baac9436694ded65362e /template.h
parent1644e9fabc0b8217233e8242d8f683df21c074ce (diff)
downloadrsyslog-99f18190a1f911224d45ca61706ae3fbc9ad7a80.tar.gz
rsyslog-99f18190a1f911224d45ca61706ae3fbc9ad7a80.tar.xz
rsyslog-99f18190a1f911224d45ca61706ae3fbc9ad7a80.zip
enhanced property replacer's regex to support submatches
- enabled Posix ERE expressions inside the property replacer (previously BRE was permitted only) - provided ability to specify that a regular expression submatch shall be used inside the property replacer
Diffstat (limited to 'template.h')
-rw-r--r--template.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/template.h b/template.h
index 5b0bcdb4..daeeb5fd 100644
--- a/template.h
+++ b/template.h
@@ -67,7 +67,13 @@ struct templateEntry {
unsigned iToPos; /* up to that one... */
#ifdef FEATURE_REGEXP
regex_t re; /* APR: this is the regular expression */
- unsigned has_regex;
+ short has_regex;
+ short iMatchToUse;/* which match should be obtained (10 max) */
+ enum {
+ TPL_REGEX_BRE = 0, /* posix BRE */
+ TPL_REGEX_ERE = 1 /* posix ERE */
+ } typeRegex;
+
#endif
unsigned has_fields; /* support for field-counting: field to extract */
unsigned char field_delim; /* support for field-counting: field delemiter char */