Word Range Filter

Definition

Description

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

 

 

Comments

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

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

A word is delimited by white space ('\s'), where one or more spaces and tabs are counted as one separator.  Leading and trailing white space is always removed before possessing the input string.

In the output string words are always separated by one single space character.

Word indexing starts from one, and if either %Number% is less than zero, that index counts backwards from the last word in the line.

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 last word.

 

Example 1 (simple indices):
First FieldName = "ev:setField"
Second FieldName = "ev:msg"
First, Second Number = 2,3
ev:msg = "\t\t the\t whole \t\t message for example 1 \t"
ev:setField = "whole message"

Example 2 (negative indices):
First, Second Number = -6,-5
ev:setField = "the whole"

Example 3 (negative/zero indices):
First, Second Number = -1,0
ev:setField = "1"

 

Example

<filter objectId="WordRange.one" type="WordRangeFilter">
	<parameter type="Condition">
		<negatePrimaryCondition>false</negatePrimaryCondition>
		<conditionRelation>Any</conditionRelation>
	</parameter>
	<parameter type="FieldName">ev:msg</parameter>
	<parameter type="Number">2</parameter>
	<parameter type="Number">-1</parameter>
	<parameter type="FieldName">ev:uniqueId</parameter>
</filter>