summaryrefslogtreecommitdiffstats
path: root/template.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-05-30 15:18:03 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-05-30 15:18:03 +0200
commit6a815063f37e7126f63fa00038f2d050574a6d52 (patch)
tree236a11b836b3a591dcb72056d56888875ef521d2 /template.h
parent99f18190a1f911224d45ca61706ae3fbc9ad7a80 (diff)
downloadrsyslog-6a815063f37e7126f63fa00038f2d050574a6d52.tar.gz
rsyslog-6a815063f37e7126f63fa00038f2d050574a6d52.tar.xz
rsyslog-6a815063f37e7126f63fa00038f2d050574a6d52.zip
capability for replacement text in no match regex case added
implemented in property replacer: if a regular expression does not match, it can now either return "**NO MATCH** (default, as before), a blank property or the full original property text
Diffstat (limited to 'template.h')
-rw-r--r--template.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/template.h b/template.h
index daeeb5fd..dff06583 100644
--- a/template.h
+++ b/template.h
@@ -73,6 +73,11 @@ struct templateEntry {
TPL_REGEX_BRE = 0, /* posix BRE */
TPL_REGEX_ERE = 1 /* posix ERE */
} typeRegex;
+ enum {
+ TPL_REGEX_NOMATCH_USE_DFLTSTR = 0, /* use the (old style) default "**NO MATCH**" string */
+ TPL_REGEX_NOMATCH_USE_BLANK = 1, /* use a blank string */
+ TPL_REGEX_NOMATCH_USE_WHOLE_FIELD = 2 /* use the full field contents that we were searching in*/
+ } nomatchAction; /**< what to do if we do not have a match? */
#endif
unsigned has_fields; /* support for field-counting: field to extract */