Re: Filter Out Filenames by Extension

  •  06-08-2007, 2:07 PM

    Re: Filter Out Filenames by Extension

    That's not working for me.  All I have in my DocumentFilters is <item>.pdf</item> and <item>.doc</item> but when I 'insert hyperlink', it still shows me all files.
     
    I know I can use filenamePattern to do what I want, I'm already using it to block out filenames that begin with an underscore (ie: <security name="filenamePattern">^[^_][a-zA-Z0-9\._\s-]+$</security>).
     
    If you have regular expression expertise, please provide me with an expression to block out a file extension.  I'm looking for something like <security name="filenamePattern">^.+\.[^(inc)]*$</security>, but this isn't quite right, it blocks all files with an 'i', 'n' or 'c' in the extension instead of the exact 'inc' extension.
View Complete Thread