有没有办法让 TFS 代码搜索识别“@"?象征? [英] Is there a way to make TFS code search recognize the "@" symbol?

查看:29
本文介绍了有没有办法让 TFS 代码搜索识别“@"?象征?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 TFS 上的代码库中搜索所有出现的过时电子邮件域.具体来说,我正在搜索@testexample.com".但是,搜索似乎完全忽略了@"符号.

I am searching for all occurrences of an out of date email domain in my codebase on TFS. Specifically, I am searching for "@testexample.com". However, the search seems to completely ignore the "@" symbol.

如果我搜索@testexample.com",我会得到所有出现的testexample.com".我也试过*@testexample.com",但代码搜索中不允许使用前缀通配符.

If I search "@testexample.com", I get all occurrences of "testexample.com". I have also tried "*@testexample.com" but prefix wildcards aren't allowed in code search.

推荐答案

不支持.

在代码搜索中检查了一些字符.您不能在搜索查询中使用除 *? 之外的符号字符,其中包括以下字符: ., : ;/ ` ' " @ = ! # $ & + ^ | ~ < > ( ) { } [ ].搜索将忽略这些符号.

Checked for some characters in code search. You can't use the symbol characters except * and ? as part of your search query, which including below characters: . , : ; / ` ' " @ = ! # $ & + ^ | ~ < > ( ) { } [ ]. The search will simply ignore these symbols.

但是您可以使用通配符 * 和 ?以扩大您的搜索范围.

But you can use wildcard characters * and ? to broaden your search.

您可以在搜索字符串中的任何位置使用通配符,除了作为简单搜索字符串或使用代码类型的查询中的前缀筛选.例如,您不能使用诸如*RequestHandlerclass:?RequestHandler.但是,您可以在其他搜索过滤器功能中使用前缀通配符;例如,搜索查询字符串 file:*RequestHandler.csrepo:?Handlers 是有效.

You can use wildcard characters anywhere in your search string except as a prefix in a simple search string or a query that uses a code type filter. For example, you cannot use a search query such as *RequestHandler or class:?RequestHandler. However, you can use prefix wildcards with the other search filter functions; for example, the search query strings file:*RequestHandler.cs and repo:?Handlers are valid.

请参阅使用通配符扩大搜索范围了解详情.

如果你想精确搜索包含这些符号的字符串(比如这里的'@'),你可以用其他字符串(比如这里的testexample.com)进行代码搜索以缩小范围首先,将具体代码复制到支持符号的文本编辑器(如Notepad++)中,然后用符号字符搜索字符串.

If you want to search the strings including these symbol exactly(such as '@' here), you can code search with other strings (eg, testexample.com here) to narrow down the scope first, then copy the specific code to text editor which support the symbols (eg, Notepad++), then search stings with the symbol characters.

此外,如果您使用 Git,另一种解决方法是使用代码搜索工具 Hound:闪电般快速的代码搜索工具,支持符号字符.参考这个线程来使用它:我怎样才能在 Intranet 上发布源代码 (Visual Studio)?

Besides, if you are using Git, another workaround is using the code search tool Hound: a lightning fast code search tool, it supports the symbol characters. Reference this thread to use it: How can I publish source code (Visual Studio) on a intranet?

这篇关于有没有办法让 TFS 代码搜索识别“@"?象征?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆