On 2002-01-07, 14:33:07 (-0500), Brett Simpson wrote:
> What effect does the asterisk have as opposed to the first>
> expression? Thanks.
An asterisk matches zero-or-more of the preceding entity (be it a character,
wildcard or something enclosed in parenthesis).
So the first would match only "blah.exe", but the second would match
"blah." and "blah.exe" (and "blah.exe.exe.exe.exe.exe").
- a plus matches one or more of something.
- the $ sign is binding the expression to the end of the word, so
neither of the above will match "blah.exe.foo".
- a dot (.) is generally a wildcard matching anything, which is why
it is escaped out using a \ in the above regexps to match only the
dot preceding the extension (the regexp ".exe$" would match the
- A parenthesis can contain multiple choices, thus the expression
"\.(exe|bat|pif)$" will match any files ending in ".exe", ".bat"
I suggest checking out "man perlre" for a more detailed description
of Perl's regular expression syntax, which is used almost (not
quite) directly by the Sanitizer.
-- Bjarni R. Einarsson PGP: 02764305, B7A3AB89 firstname.lastname@example.org -><- http://bre.klaki.net/
Check out my open-source email sanitizer: http://mailtools.anomy.net/ Spammers, please send plenty of email to: email@example.com