Welcome to the Mythicsoft Q&A site for:

- Agent Ransack
- FileLocator Lite
- FileLocator Pro

Please feel free to ask any questions on these products or even answer other community member questions.

Useful Links:

- Contact Us
- Help Manuals
- Mythicsoft Home
+1 vote

I'm trying to exclude a set of folders from my search called 'generated-sources'. They could be at different depths within the folder hierachy. I've tried creating a regex based Persistent Search Filter .*\\generated-sources\\.* but that doesn't work.

by (715 points)

1 Answer

+1 vote

You're missing the '+' or '-' to show what type of filter it is (inclusion or exclusion). Instead try this: -generated-sources

Search filter exclusion

The filter is then applied against every search folder and because the '-' specifies an exclusion filter any folder with generated-sources in its path would be excluded from the search.

Your regular expression .*\\generated-sources\\.* would still work with the '-' applied, ie -.*\\generated-sources\\.*, but the solution above is a little simpler and therefore a little faster.


More information

To understand how Persistent Search Filters are applied imagine that they are simply appended to the end of your search path. So if you were searching in C:\My\Folders and had both the 'SVN/HG' and 'Recycle bin' filters applied, internally the Look In functionality would be:

C:\My\Folders;-:regex:\\(\.svn|\.hg|\.git|cvs)\\;-recycle

You may have noticed a little undocumented feature here. The filter can specify the expression type as part of the filter, in this case :regex: specified that the filter should be treated as a regular expression. The complete list of filter expression types are:

  • :bool: - Boolean expression
  • :boolre: - Boolean RegEx
  • :regex: - Regular expression
  • :word: - Whole word
  • :dos: - DOS expression
by (30.1k points)
...