Notepad++ find in files filter EXCLUDE

前端 未结 8 1368
时光取名叫无心
时光取名叫无心 2021-02-03 16:53

I\'m looking for a way to get n++\'s find in files dialog to exclude certain files...

the only reference I\'ve found so far is this http://sourceforge.net/project/showno

相关标签:
8条回答
  • 2021-02-03 17:28

    I just had the same problem and found a 3-step solution:

    1. Search in all files
    2. Copy the result as text in a new Notepad++ tab
    3. Use a regular expression to remove all entries that do not interest you

    Here is my RegEx (the two spaces at the start are relevant):

      M:\\.+?\\([^\\]+\.(csproj|dll)|packages\.config|Build\.props) \(\d+ hits?\)([\r\n]+\t.+)+[\r\n]+
    

    All my results where on M:, you will have to adapt the start to what fits your results. If you run a "Replace all" with an empty string it removes all results in files ending with "csproj" or "dll", and also in the files "packages.config" and "Build.props".

    0 讨论(0)
  • 2021-02-03 17:28

    Please note tested with Notepad++ v7.8.7

    as n00b has answered

    This works:

    *.* !*.obj

    But this does not work!: *.*;!*.obj => searches no files!

    on the other hand this does work *.*; !*.obj

    0 讨论(0)
提交回复
热议问题