Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 11 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
如果您只是寻找
something.somethingelse.violation
,那么您可以使用 Visual Studio。在查找对话框中,选中底部的“使用”框,然后选择“正则表达式”。
不是很强大,但您可以使用
<[:a_]+\.([:a_]+\.)+[:a_]+
来查找上面的模式。更好的工具是
grep
或解决方案目录中的类似工具,因此您可以使用更强大的正则表达式选项,例如负向后查找,这将允许您排除诸如using
指令和命名空间
声明。适用于 Windows 的 grep
您可能可以非常快速地编写一个 .NET 应用程序来递归给定的目录并使用 .NET Regex 搜索相同的 .cs 和/或 .vb 文件,它具有环视功能,但当然使用 VS 的优点是您可以保留在源代码编辑器中。
If you're just looking for
something.somethingelse.violation
, then you can use Visual Studio.In the find dialog, check the box at the bottom to "Use" and select "Regular Expressions."
Not very robust, but you can use
<[:a_]+\.([:a_]+\.)+[:a_]+
to find the pattern above.A better tool would be
grep
or similar on the solution directory, so you can use more powerful regex options like negative lookbehind, which would allow you to exclude things likeusing
directives andnamespace
declarations.grep for Windows
You could probably very quickly write a .NET app that would recurse a given directory and search .cs and/or .vb files for same, using .NET Regex, which has lookarounds, but of course the advantage of using VS is that you remain right in the source code editor.