Filter

Top  Previous  Next

The Filter section determines what you want to do with the data read as input. A single filter script may reference multiple individual <Filter> sections to perform multiple tasks within the same data set. You can also find filter statement examples here and complete script examples here.

 

<Filter>

 <Search>

         See Search section

 </Search>

 <Replace>

         See Replace section.

 </Replace>

 <Continue>

         See Values and Description

 </Continue>

 <Abort>

         See Values and Description

 </Abort>

</Filter>

 

 

Flag

Values and Description

Search

Please review the Search section for a detailed explanation of this tag and its components.

Replace

Please review the Replace section for a detailed explanation of this tag and its components.

Continue

This tag determines whether or not you want the script to continue to the next action if it finds a match. This tag can be set to a value of True or False.

 

For example, let's say we're searching for the text 345 within the input file's data. Let's also say that no match for 345 can be found in the input data.

If Continue is set to True, the filter will move to the next specified <Filter> section. If Continue is set to False, the script will immediately terminate upon not finding a match.

Abort

If the search section finds a match and Abort has a value of True, the script is aborted. Basically, the input data is left unchanged and no more filter blocks are processed. It just abruptly ends the filter processing and quits out without saving anything.

 

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.