The modification
rules allow you to specify how to process value strings before
showing them in the report. The program also uses similar rule sets
to determine visitor browsers, operating systems, device types and
spiders. These rules are located in the Browsers.cfg,
OperatingSystems.cfg, DeviceTypes.cfg
and Spiders.cfg files in
the Config subfolder of the WebLog Expert data folder
(usually C:\Program Files\WebLog
Expert under Windows XP/2003 or
older and C:\ProgramData\WebLog
Expert under Windows Vista/2008/7
or later).
Processing Order
Rules are to be
specified one per line. Each rule contains matching string and name
like
String = Name
Example: WebTV
= MSN TV (WebTV)
If a rule matches
value, an appropriate name is shown in the table. By default the
program finishes processing rules when it finds the first matching
rule. However, you can enable the Match all rules option for some data types to continue
processing after finding a matching rule. In this case there may be
multiple names that correspond to the same value and will be shown
in the report. You can also use the # character to mark some
rules as final even when using this option (see below).
The
Keep original
value if no rules match it option
is useful if you need to modify some values and show other ones
unchanged.
If there are no
matching rules and the Keep original value if no rules match
it option is disabled, or if a
matching rule contains an empty name, no information on the value
is shown in the report.
Rules Syntax
Simple rules look like String =
Name. If the String is found in the
value, the rule matches the value.
Wildcard rules look like Pattern
$=
Name. The "*" wildcard corresponds
to any number of any characters (or no characters at all) and "?"
corresponds to any single character.
Example: /dir/* $=
/dir/
While simple rules search
for substring matches, wildcard rules require full value to match
the pattern. E.g. the following rules will work the same
way: substr = name
and *substr* $=
name
Regular expressions. You can also use regular expressions in the rules like
RegExp ~= Name. In this case the Name can contain back references
like \0, \1, \2, etc. \0 matches the whole string found, \1, \2,
etc. match the same strings that match the appropriate marked
sub-expression in the regular expression.
Examples:
Mozilla.*?MSIE (\d+) ~= Internet Explorer
\1.x
.*robot.* ~= \0
Negative matches. You can use the !
character in case if a string/regular
expression must not match the value.
Examples:
Opera != Non-Opera Browser
^DA \d !~= Non-Download Accelerator User
Agent
Final rules. If you use the Match all rules option you can still instruct the program to finish
rule processing if a specific rule matches the value. You need to
use the # character in this rule.
Example:
Mozilla.*?MSIE.* \.NET CLR #!~= No .NET
Framework
This rule means: if a value doesn't match
the Mozilla.*?MSIE.* \.NET CLR
regular expression, finish processing
rules and show No .NET
Framework in the report.
Character order is
important. The following rule specifiers are valid:
=,
!=,
$=,
!$=,
~=,
!~=,
#=,
#!=,
#$=,
#!$=,
#~=,
#!~=.
Rules for file and
directory names match values without domain and protocol,
e.g. /dir/file.htm.