regular expressions and space
Jason Voorhees
jvoorhees1 at gmail.com
Tue Mar 3 18:49:26 GMT 2009
Hi:
On Tue, Mar 3, 2009 at 1:26 PM, Dave <wintermutecx at gmail.com> wrote:
> [root at mail2 tmp]# ls test*doc*
> test 123.doc test123.doc
>
Those aren't regular expressions, they're only wildcards.
>
> deny test*doc* - -
>
test*doc matches :
tesdoc
testdoc
testtttdoc
testttt....ttdoc
* is any character any times in wildcards expressions
* is 0, 1 or more occurrences of the previous caracter in regular expressions
. is any character in regular expressions
>
> test123.doc gets denied but test 123.doc does not.
>
If you want to deny files of the form "test*doc*" (in wildcards syntax
and without quotes) you should write the rule like this:
deny test.*doc.* - -
>
> Should they both be denied?
There are a lof of regular expressions tutorials at Internet that
could be useful to you.
Bye :)
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!
>
More information about the MailScanner
mailing list