Search

Top  Previous  Next

The Search section determines what you want the filter to look for. This section is defined as follows:

 

<Search>

 <Section>

         See Values and Description

 </Section>

 <Type>

         See Values and Description

 </Type>

 <Text>

         See Values and Description

 </Text>

</Search>

 

 

Flag

Values and Description

Section

This tag determines where the filter should look for the data specified in the Text tag (see below).

 

Values

Explanation

All

All tells the filter to search the entire data set read from the input file.

Recipient

Recipient tells the filter to search only in the first line of the file.

Sender

Sender tells the filter to search only in the second line of the file.

Message

Message tells the filter to search only in the third and following lines of the file.

Temp

Temp is a string variable that can be passed strings of characters to hold, then use its value to search on later. Temp does not support boolean operators. For example, you can have certain information stored in the Temp value, then both search on and output that Temp value in successive Filter tags. See Example 1 and Example 3.

Flag

Flag is a boolean value that can only hold a true or false statement. However, you can run "And" or "Or" statements against it for advanced logic chains. See Example 1 and Example 3.

 

Type

Values: Literal or RegEx

 

This tag determines whether you want to use literal text or a RegEx statement in the Text tag.

Text (Literal)

If the Type tag is set to Literal, this tells the filter to search on the text entered in to the Text tag. For example, you could enter the literal text Fire Department if you wanted the filter to key off of the literal text "Fire Department" (without the quotes).

 

This tag supports the following boolean parameters:

* - Multiple Character Wildcard

For example, fire* would find fire, firewood, fireplace, fireman and similar.

 

? - Single Character Wildcard

For example, fire? would fine fires, fired but would not find fire.

 

~ as first character means start of section/file

~ as last character means end of section/file

For example, ~12345~ would only read 12345. Without the ~ before and after the string, the filter would recognize 12345 in 0123456.

 

This tag also supports the following variables:

%Recipient% - the current value for Recipient

%Sender% - the current value for Sender

%Message% - the current value for Message

%All% - the current value for All of the text

%Temp% - the current value for the Temp variable

\ - following 3 digits are a decimal character value. See Below.

Text (Regex)

The PageGate Filter script supports RegEx expressions. RegEx uses a Pearl compatible implementation syntax and a good reference guide for the language can be found here:

http://www.regular-expressions.info/tutorialcnt.html

 

As an important note, due to the way this script is programmed, certain characters are treated as command characters instead of literal text characters. The following characters represent certain command functions in the script:

Character

Function

~

~ as first character means start of section/file, ~ as last character means end of section/file. For example, ~123~ would only find 123 and not 01234 or 1237, etc. ~123 would find 12340 but would not find 01234. 123~ would find 0123 but would not find 01234.

?

Single character wildcard.

*

Multiple character wildcard.

\

IMPORTANT

ASCII value prefix (Ex: \013 for a carriage return, \010 for a line feed). The \ must be followed by a three digit code to indicate the character to be output.

 

This character is used when you want to represent a character as represented by its ASCII Decimal value. For example, since the filter directly references the character ~ in its function, if you want to use the ~ character in your text, you'll need to represent it with its ascii value. The ascii value of ~ is \126.