Previous Topic: Pattern CharactersNext Topic: Nodal versus Nodeless Objects


Pattern Hierarchy

To make the most accurate match when multiple patterns are involved, patterns must be arranged in a hierarchy from the most- to the least-specific. The following classifications are used to assign the accuracy of a pattern. These classifications apply to objects that contain nodes only. (For information on the classification of nodeless objects, see the topic, Nodal versus Nodeless Objects.

Specific

This classification defines any pattern that does not contain a dash. Patterns so classified are sorted left to right. Examples are:

ABC.MNO.XYZ
ABC.X*.LIST
ABC.??LIST??.*DATA
Prefixed/Suffixed/Containing Combination

This classification defines any pattern containing two or more dashes within the pattern, but not at the beginning or end of the pattern. An example is:

ABC-LMNO##-XYZ
Prefixed/Suffixed Combination

This classification defines any pattern that contains a single dash (or * for nodeless) within the pattern, but not at the beginning or end. Examples are:

ABC???.-XYZ
ABC-XYZ
Prefixed

This classification defines any pattern that ends with a dash. Examples are:

ABC-
ABC-.XYZ.-
*ABC.-
A!B??.-

Note: It is appropriate to note that some of these examples represent inefficient patterns (those that require more scanning overhead), as is shown in the two examples above. Although patterns that contain embedded dashes or begin with a wild card character are valid, it is recommended that you attempt to be as specific from left to right as possible to avoid this overhead. This note also applies to the next two pattern classifications, Suffixed and Containing.

Suffixed

This classification defines any pattern that begins with a dash. Examples are:

-.LIST*
-.*XYZ
-.???XYZ
Containing

This classification defines any pattern that begins and ends with a dash. A pattern containing an additional embedded dash also falls under this classification. Examples are:

-XYZ-
-.??ABC??.-
-.-.-

Once classified, patterns in the same class can be compared directly. The pattern is translated to force wildcard characters to be higher than other characters in the pattern mask. Wildcard characters that match are processed in the following collating sequence:

The following list illustrates this order:

ABCDEF.XYZ
ABC###.XYZ
ABC@@@.XYZ
ABC!!!.XYZ
ABC???.XYZ
ABC*.XYZ
ABC-.XYZ