From 4cfbf894fd0caebaf65e1b7ffcb5725a530cf67d Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 11 Nov 2008 12:00:11 +0100 Subject: 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. --- doc/property_replacer.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/property_replacer.html') diff --git a/doc/property_replacer.html b/doc/property_replacer.html index 0b4f1a01..2748dc89 100644 --- a/doc/property_replacer.html +++ b/doc/property_replacer.html @@ -219,10 +219,11 @@ that the first match is number 0, the second 1 and so on. Up to 10 matches (up to number 9) are supported. Please note that it would be more natural to have the match-number in front of submatch, but this would break backward-compatibility. So the match-number must be specified after "nomatch". -

nomatch is either "DFLT", "BLANK" or "FIELD" (all upper case!). It tells +

nomatch is either "DFLT", "BLANK", ZERO or "FIELD" (all upper case!). It tells what to use if no match is found. With "DFLT", the strig "**NO MATCH**" is used. This was the only supported value up to rsyslog 3.19.5. With "BLANK" -a blank text is used (""). Finally, "FIELD" uses the full property text +a blank text is used (""). With "ZERO", "0" is used. +Finally, "FIELD" uses the full property text instead of the expression. Some folks have requested that, so it seems to be useful.

The following is a sample of an ERE expression that takes the first -- cgit