Line Range Filter

Definition

Description

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

 

 

Comments

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

Line indexing starts from one, and if either Number is less than zero, that index is counted backwards from the last line.

New line characters are preserved in the resulting string.

New line characters at the end of the input string are optional. Therefore, the following lines are considered equivalent:

"Line 1\nLine 2\n"
"Line 1\nLine2"

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 line.

Example 1 (simple indices):
First FieldName = "ev:setField"
Second FieldName = "ev:msg"
First, Second Number = 3,4
ev:msg = "the\n whole \n message\n33\n"
ev:setField = "message\n33"

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

Example 3 (negative/zero indices):
First, Second Number = -2,0
ev:setField = "message\n33"

 

Example

<filter objectId="LineRange.three" type="LineRangeFilter">
	<parameter type="Condition">
		<negatePrimaryCondition>false</negatePrimaryCondition>
		<conditionRelation>Any</conditionRelation>
	</parameter>
	<parameter type="FieldName">ev:NewId</parameter>
	<parameter type="Number">12</parameter>
	<parameter type="Number">-7</parameter>
	<parameter type="FieldName">ev:msg</parameter>
</filter>