regular expressions and space
Denis Beauchemin
Denis.Beauchemin at USherbrooke.ca
Tue Mar 3 18:51:22 GMT 2009
Dave a écrit :
> [root at mail2 tmp]# ls test*doc*
> test 123.doc test123.doc
>
>
> deny test*doc* - -
>
>
> test123.doc gets denied but test 123.doc does not.
>
>
> Should they both be denied?
>
Dave,
As a regular expression, "test*doc*" means "tes" followed by zero or
more "t", followed by "do", followed by zero or more "c".
You probably want "test.*\.doc$" which means "test" followed by zero or
more characters, followed by ".doc" and nothing else afterwards.
Denis
--
_
°v° Denis Beauchemin, analyste
/(_)\ Université de Sherbrooke, S.T.I.
^ ^ T: 819.821.8000x62252 F: 819.821.8045
More information about the MailScanner
mailing list