Substitute String Filter - v2

Definition

Description

If event matches Condition substitute every occurrence of Expression in FieldName with Expression.

 

 

Comments

If FieldName is missing, blank, or invalid, do nothing.

The first Expression is interpreted as a regular expression.

The second Expression is a literal character sequence which may include new line (\n) or other special characters.

Example:
First String = "gl[ia]de"
FieldName = "ev:msg"
Second String = "-----"

Event before:
ev:msg = "This is a glade but not a glide"

Event after:
ev:msg = "This is a ----- but not a -----"

For more information on Regular Expressions, please see Sun's regular expression patterns summary.

 

Example

<filter objectId="case1" type="SubstituteStringFilter-v2">
	<parameter autoSetDescription="false" comments="Add comments for Condition..." description="app=case1" type="Condition">
		<negatePrimaryCondition>false</negatePrimaryCondition>
		<conditionRelation>All</conditionRelation>
		<conditionSpec>
			<negate>false</negate>
			<fieldName>ev:app</fieldName>
			<operator>eq</operator>
			<valueType>string</valueType>
			<value>case1</value>
		</conditionSpec>
	</parameter>
	<parameter autoSetDescription="true" comments="Add comments for Expression..." description="gl[ia]de" type="Expression">
		<type>String</type>
		<formatString>gl[ia]de</formatString>
	</parameter>
	<parameter type="FieldName">ev:msg</parameter>
	<parameter autoSetDescription="true" comments="Add comments for Expression..." description="-----" type="Expression">
		<type>String</type>
		<formatString>-----</formatString>
	</parameter>
</filter>