summaryrefslogtreecommitdiffstats
path: root/template.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-11-11 12:00:11 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2008-11-11 12:00:11 +0100
commit4cfbf894fd0caebaf65e1b7ffcb5725a530cf67d (patch)
treeb92ab2dbac3bbec2f007e97a35d7efb374733563 /template.h
parentb104759ad671a1ae92f2768de02f1dbbe5f4cb12 (diff)
downloadrsyslog-4cfbf894fd0caebaf65e1b7ffcb5725a530cf67d.tar.gz
rsyslog-4cfbf894fd0caebaf65e1b7ffcb5725a530cf67d.tar.xz
rsyslog-4cfbf894fd0caebaf65e1b7ffcb5725a530cf67d.zip
enhance: regex nomatch option "ZERO" has been added
This allows to return the string 0 if a regular expression is not found. This is probably useful for storing numerical values into database columns.
Diffstat (limited to 'template.h')
-rw-r--r--template.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/template.h b/template.h
index 6e889c58..318f3f32 100644
--- a/template.h
+++ b/template.h
@@ -78,7 +78,8 @@ struct templateEntry {
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*/
+ TPL_REGEX_NOMATCH_USE_WHOLE_FIELD = 2, /* use the full field contents that we were searching in*/
+ TPL_REGEX_NOMATCH_USE_ZERO = 3 /* use 0 (useful for numerical values) */
} nomatchAction; /**< what to do if we do not have a match? */
#endif