|
While processing incoming messages, the program can find and
extract any data you need from a message header and message body and save it to
a text file. To indicate fields the program will search, you need to set up
Field Extractor. Just select
Field Extractor from the drop down list,
or click the black down arrow next to its name and select
Add New menu.

This will display the Field
Extractor window.

Field Name specifies a
name of the field the program will search for in your messages.
ATTENTION!
|
|
If you enter a field name and it appears marked by
red, it means that you use the program's
reserved fields. Reserved keywords are part of the grammar of the
Transact-SQL language used by G-Lock Email Processor.
If you are going to set up Database Manager, you should
change red field names in order to avoid errors. You can use lowercase and
uppercase letters, numbers from 0 to 9 and the underline _ symbol, for
example:
Date -> DateM
From -> From1
To -> To_ |
Source specifies where
the program will search for the indicated field.
Remove quotes - check
this option if you want the program to save the specified field without quotes.
Remove leading space -
check this option if you want the program to save the specified field without
leading space.
Remove trailing space
- check this option if you want the program to save the specified field without
trailing space.
Skip rule action if field is
not found - check this option if you want the program to skip this rule
action if the specified field was not found in the message.
Start After specifies start search position for the specified field.
There are the following conditions you can set:
Beginning of Line - the program
starts searching just from the beginning of line.
Defined Text - the program starts
searching after the text specified in the next box.
Defined Text From New Line - the
program starts searching from a new line after the text specified in the next
box.
Regular Expression - the program
searches for the regular expression specified in the next box.
Continue up to box specifies end search position for the specified field.
There are the following conditions you can set: End of Line, Defined Text, End
of Text Plain Part, Regular Expression and Submatch String.
If you specify
Submatch String as the end search
position, you have to enter the submatch string number (or name) into the next box.
The regular expression includes several submatch srtings that are enclosed in
round brackets (), for instance:
([\w\W]+):([\w\W]+):([\w\W]+)
1
2
3
This mask includes 3 submatch
strings (to test the mask, use Test Regular Expression tab).
The
regular expression that matches this mask is:
Alex Markov: G-Lock Email Processor: subscribe
Thus, the values that correspond
to the submatch strings are:
0
= Alex Markov: G-Lock Email Processor: subscribe
1
= Alex Markov
2 =
G-Lock Email Processor
3
= subscribe
If you want to assign the value
of the 1st submatch string (in our example, Alex Markov) to the appropriate field, you
enter 1 in the required box, etc. If you enter 0, the value of the entire
regular expression will be assigned to the field.

Or, you can type the following mask for the same regular
expression:
(?P<UserName>[\w\W]+):(?P<Product>[\w\W]+):(?P<Action>[\w\W]+)
This mask includes the names of
each submatch string: 1 - UserName, 2 - Product, 3 - Action.
In this case, you should select Submatch Name
and enter the submatch name instead of the number, for instance:

Tip:
|
|
To extract the data that matches the specified regular
expression, set Start Position and
End Position like this: select
Regular Expression menu, type your regular expression in the next box
and check Include to Result boxes.
|
Match Case - check this option if you want the program to recognize all
capital letters in the field name you indicated. If this option is unchecked,
the program will ignore capital letters while searching for a specified field.
Whole String - check
this option if you want the program to search for the specified string only.
Include to Result - check this option if you want the program to include
into the result that will be saved to a file the text specified in the
Start After/Continue up to fields, for
example: Maillist - Temp Cleaner. If this option is unchecked, only the value of
the specified field will be saved.
Test Regular Expression
tab allows you to check if the specified regular expression matches the source
text, i.e. whether you correctly created a regular expression you want the
program to search for in the specified text.
Type a regular expression in the appropriate window. Enter
the text that this regular expression must match in the
Source window and click
Match. To find the next regular
expression that matches the same mask, click
Match Next. The Result window will
show you the searching results.
View Generated Value tab allows you to test the mask for generating a
value. Type your mask in the appropriate window and click Generate. You
will see the result in the Generated Value window. |