Don't understand this match

Julian Field MailScanner at
Wed Mar 1 20:51:13 GMT 2006

Hash: SHA1

Richard Thomas wrote:
> I'm not understanding why a certain filename has triggered the "Attempt
> to hide real filename extension" rule. The filename is
> Shortcut 29 t.xls
> The rule is \.[a-z][a-z0-9]{2,3}\s*\.[a-z0-9]{3}$
> As I understand it, that should match a period, followed by an alpha, 
> followed by two or three alphnumerics, any amount of whitespace and 
> then another period then an alphanumeric three character alphanumeric 
> extension all of this being at the end of the filename.
> The filename in question has only one period.
> Of course, I'm not sure which particular version of regular 
> expressions MailScanner uses (maybe the period is the "match any 
> character" period.
It uses Perl's regular expressions. In all regular expressions that I 
know of, an unescaped "." means match "any single character".
> Is there a bug in the regexp? Is this actually a valid match? Is this 
> just a case of "upgrade to the latest"? Possibly I am just wildly out 
> of date :)
This regexp is just fine, it has been there for several years without 
any changes whatsoever. I wrote it carefully and got it right first time.

- -- 
Julian Field
Buy the MailScanner book at
Professional Support Services at
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

Version: PGP Desktop 9.0.5 (Build 5050)


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the MailScanner mailing list