Notepad++ find in files filter EXCLUDE

前端 未结 8 1387
时光取名叫无心
时光取名叫无心 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".

提交回复
热议问题