From 6a815063f37e7126f63fa00038f2d050574a6d52 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 30 May 2008 15:18:03 +0200 Subject: 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 --- template.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'template.h') 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 */ -- cgit