ContentBox’s FileBrowser module has the following regex settings in the ModuleConfig file:
// Image Name filtering applies to both files and directories. This is also a regex. Where the filterType=image.
imgNameFilter = “^((?!.).)*$|.+.(jpg|jpeg|bmp|gif|png)/? ",
// Flash Name filtering applies to both files and directories. This is also a regex. Where the filterType=flash.
flashNameFilter = "^((?!.).)$|.+.(swf|fla)/? *”,
What is the intent of putting “/? *” at the end of these?
Neither the comment above nor the commit message shed any light on what is being attempted, but since the patterns are applied to file/directory names (not paths), the optional slash wont match and spaces are unlikely (and, since there’s no anchor, unnecessary), so I’m wondering why they are there.
Also, without an end-of-string anchor this will accept stuff like “not.swf.really” as a flash file, which is probably not what is wanted.
If someone can explain what’s supposed to be matched/excluded I can submit a pull request with appropriate patterns, but at the moment I don’t see what it’s trying to do, so not sure what a fix needs.