Sample Rule 7


Description

This rule will extract the last three characters of a string and then use this information to insert a long name into a folder.

Rule

++:FI!+-:imatch("
pdf=Adobe,xls=Spread Sheet,doc=Word,htm=HTML,wpd=WordPerfect,php=Program,com=HTML,ppt=Presentation,",
imatch([File Name], ".{3}\s*$")+"=(.+?),"):
[Location]="Web" or [Location]="Server"

Explanation

This rule does a match on a string Line 3 and replaces it with the long names contained in line 2.

Line 3 takes the contents of the folder [File Name] and extracts the last three characters ".{3}\s*$", allowing for spaces after the characters, and then compares that to the three character strings on the left side of the equal sign in line 2, and then replaces it with long file name on the right side of the equal sign.

Example

[File Name] = "http://tech.groups.yahoo.com"
the rule would return "HTML"