gpt4 book ai didi

tfs - 有没有办法让 TFS 代码搜索识别 "@"符号?

转载 作者:行者123 更新时间:2023-12-03 22:21:57 24 4
gpt4 key购买 nike

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

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

最佳答案

这是不支持的。

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

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

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.



请查看 Broaden your search with wildcards详情。

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

此外,如果您使用 Git,另一种解决方法是使用代码搜索工具 Hound: a lightning fast code search tool ,它支持符号字符。引用这个线程来使用它: How can I publish source code (Visual Studio) on a intranet?

关于tfs - 有没有办法让 TFS 代码搜索识别 "@"符号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46411923/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com