Character Range Filter

Definition

Description

If event matches Condition set FieldName to the character range from Number to Number in FieldName.

 

 

Comments

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

Character range indexing starts from one, and if either Number is less than zero, that index is counted backwards from the end of the string.

If the starting index is greater than the ending index the result is an empty string ("").

For the first number index, a value of zero is the same as a value of one.

For the second number index, a value of zero is the same as the end of the string.

Each newline ('\n') character is replaced with a single space before the input string is processed.

Example 1 (simple indices):
First FieldName = "ev:setField"
Second FieldName = "ev:msg"
First, Second Number = 6,10
ev:msg = "the whole\nmessage"
ev:setField = "hole"

Example 2 (negative indices):
First, Second Number = -7,-4
ev:msg = "the whole message"
ev:setField = "mess"

Example 3 (negative/zero indices):
First, Second Number = -3,0
ev:msg = "the whole message"
ev:setField = "age"

 

Example

<filter objectId="CharacterRange.two" type="CharacterRangeFilter">
	<parameter type="Condition">
		<negatePrimaryCondition>false</negatePrimaryCondition>
		<conditionRelation>Any</conditionRelation>
	</parameter>
	<parameter type="FieldName">ev:host</parameter>
	<parameter type="Number">3</parameter>
	<parameter type="Number">7</parameter>
	<parameter type="FieldName">ev:uniqueId</parameter>
</filter>