有没有一种方法可以使TFS代码搜索识别出"@"标记.象征? [英] Is there a way to make TFS code search recognize the "@" symbol?

查看:122
本文介绍了有没有一种方法可以使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.

您可以在搜索字符串中的任何位置使用通配符,除了 作为简单搜索字符串或使用代码类型的查询中的前缀 筛选.例如,您不能使用搜索查询,例如 * RequestHandler 类:?RequestHandler .但是,您可以将前缀通配符与其他搜索过滤器功能一起使用;例如:例如, 搜索查询字符串 file:* RequestHandler.cs repo:?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.

请参阅使用通配符扩大搜索范围以获取详细信息.

Please see Broaden your search with wildcards for details.

如果要精确搜索包含这些符号的字符串(例如此处的'@'),则可以使用其他字符串(例如此处的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天全站免登陆