如何在GitHub代码搜索中转义字符? [英] How do I escape characters in GitHub code search?

查看:171
本文介绍了如何在GitHub代码搜索中转义字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 GitHub的代码搜索来搜索包含诸如<$ c之类的字符的某些代码行$ c> = , + 等。

I'm trying to use GitHub's code search to search for some lines of code containing characters like =, +, etc.

我从 https://help.github.com/articles/searching-code/#代码搜索注意事项,这些字符是通配符,必须转义,否则它们将被忽略。

I understand from https://help.github.com/articles/searching-code/#considerations-for-code-search that these characters are wildcards and have to be escaped, otherwise they will be ignored.

下面是一个示例:如果\(做的是True\) ,另一个:如果(正确的话)

Here's an example: "if \(done is True\)", and another: "if (done is True)".

两者都返回相同的您的查询包含被忽略的字符 在搜索右侧酒吧。我的转义似乎没有做任何事情,并且得到的结果是忽略了字符。

Both return the same "your query contains a character that is ignored" warning on the right side of the search bar. My escaping doesn't seem to be doing anything and the results I get are with the characters ignored.

推荐答案

我不认为您可以为github逃脱字符

I dont think you can escape characters for github

来自搜索代码文档:


您不能在搜索
中使用以下通配符查询:。 ,:; / \`' = *!?#$& + ^ |〜<>(){} []
搜索将忽略

这篇关于如何在GitHub代码搜索中转义字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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