开发者

Find all folders excluding some paths

In visual studio when searching for files, how can I find all files that do not contain a certain string in their directory path or file name?

For example:

I want to find all files that have the word MainRegion but I do not want files such as:

c:\myfiles\file1Fixture.cs
c:\myfiles\somedirectory\a.b.tests\filename.xaml

So I want to exclude file names with "Fixture" in and directory paths with "tests" in.

开发者_如何转开发

JD


^.*\\[^\\]*Fixture[^\\]*$

should match files that contain Fixture in the file name (but not in the path).

^.*tests.*\\[^\\]*$

should match files that contain tests in the path, but not in the filename.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜