On Lun 21 ao=FBt 2006 10:04, Marc MENDEZ a =E9crit :
> Hi,
>
> A few days ago, somebody on this list sent me a solution (a regexp he
> tested
> on his website), but, I lost the answer.
> I looked at the archive, but the message is not published...
> Could you posted it again !
>
> thanks !
>


Here is the mail from TJ Saunders :

------------------------ QUOTE ------------------------
> Sorry, but it does not work. I must use quotes, 'cause my full regexp
> contains white spaces
>
> PathAllowFilter "^[a-zA-Z0-9_\.\$()-]+$|^New folder$"
>
> But I tried without quotes, with double antislashes or not... does not wo=

rk
>


OK. Using my regex-testing tool:

http://www.castaglia.org/proftpd/contrib/regex.html

I was able to find a pattern which may work for you:

PathAllowFilter "^[][a-zA-Z0-9_\\.\\$()-]+$|^New folder$"

The man page for "regex" helped to supply a little more information:

To include a literal `]' in the list, make it the first
character (following a possible `^'). To include a lit-
eral `-', make it the first or last character, or the sec-
ond endpoint of a range. To use a literal `-' as the
first endpoint of a range, enclose it in `[.' and `.]' to
make it a collating element (see below). With the excep-
tion of these and some combinations using `[' (see next
paragraphs), all other special characters, including `\',
lose their special significance within a bracket expres-
sion.

Hence why I'm hoping that the addition of "][" to your bracket expression,
rather than "[]", may work.

Cheers,
TJ

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~=
~~~~

And ever has it been that love knows not its own depth until the hour of
separation.

-Kahlil Gibran

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~=
~~~~
--------------------- END QUOTE ---------------------
Cheers,

Alex


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easi=
er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=...63057&dat=3D1=
21642
_______________________________________________
ProFTPD Users List
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html