月经前一周是什么期| 排卵期会有什么症状| 血管脆是什么原因| luky是什么意思| 带id是什么意思| 小便次数多是什么原因| 买手机上什么网| 吃什么水果补血| 猫砂是什么| 对数是什么意思| 造化什么意思| bys是什么药| 虎的本命佛是什么佛| 成都市市长是什么级别| 强迫症吃什么药效果好| 碳酸是什么| hoka跑鞋中文叫什么| gp什么意思| 白头翁是什么| 膈应人是什么意思| 吃芒果过敏吃什么药| 尿酸高吃什么好| 傀儡什么意思| 办身份证的地方叫什么| 昀字五行属什么| 海带与什么食物相克| 眼底出血是什么原因造成的| 食物中毒挂什么科| 火车动车高铁有什么区别| 斑斓什么意思| 血糖高吃什么降血糖| 去医院洗纹身挂什么科| 穿刺活检能查出肿瘤是什么性质吗| 1月24号什么星座| 熬夜眼睛红血丝用什么眼药水| 什么不息| 气场什么意思| 8月14日是什么星座| 小孩办身份证需要什么材料| 什么人不适合做厨师| 文房四宝指的是什么| 褥疮用什么药膏| 多梦吃什么药| 丙肝阳性是什么意思呢| 睡醒头疼是什么原因| 囊实性结节是什么意思| 贾珍和贾政是什么关系| 头晕吃什么药效果好| 智齿有什么作用| 围子是什么动物| 拖油瓶是什么意思| 5.8是什么星座| 干贝和瑶柱有什么区别| 煲什么汤含蛋白质高| ug什么意思| 什么时候最容易怀孕| 早晨起来口干舌燥是什么原因| 脖子肿了是什么原因| 办准生证需要什么资料| 浅尝辄止什么意思| 小孩子长白头发是什么原因| 男性尿道痒吃什么药| au585是什么金| 左手大拇指抖动是什么原因| 麻鸭是什么鸭| 1.1是什么星座| 刘邦是什么星座| 雪村和赵英俊什么关系| 黄鼠狼最怕什么| 一月十二号是什么星座| 发什么什么大| 交泰殿是干什么的| 孩子腿疼挂什么科| 头疼想吐是什么原因| 绝经前有什么症状| 时光荏苒是什么意思| 祛斑去医院挂什么科| 为什么孩子要跟爸爸姓| ns是什么意思| 眼睛模糊吃什么好| 什么字笔画最多| 移动硬盘什么牌子好| 海参什么样的好| 观音菩萨原名叫什么名| 楠字取名有什么寓意| 人突然晕倒是什么原因引起的| 早上9点半是什么时辰| 处大象是什么意思| 白细胞酯酶是什么意思| crp是什么检查项目| 皮肤松弛是什么原因造成的| 小孩睡觉出很多汗是什么原因| 脾虚吃什么药效果最好| 无心是什么意思| 狐媚是什么意思| 白毫银针是什么茶| 神经递质是什么意思| 圣诞节的礼物什么时候送| sorona是什么面料| 乳腺囊性增生是什么意思| max是什么意思| 超声介入是什么意思| 超能力是什么意思| 勾心斗角什么意思| ch2o是什么物质| 长沙有什么山| 豆浆机什么牌子好| 胃有灼烧感是什么原因| 安厝是什么意思| 基因检测是什么意思| 感冒为什么不能吃鸡蛋| 宫颈多发纳囊什么意思| 舌头起泡是什么原因| 拉肚子拉稀水吃什么药| 尿出来很黄是什么原因| 郭字五行属什么| leu是什么意思| 睡觉流口水是什么原因| 右肩膀疼痛预示什么病| chanel什么牌子| 九月初十是什么星座| 血管瘤是什么样子的图| 严重失眠吃什么中成药| 杏花代表什么生肖| 肚子痛去医院挂什么科| 兔死狐悲是什么生肖| 吃什么药可以推迟月经| 葡萄糖高是什么原因| 狗翻肠子什么症状| 肠胃炎可以吃什么食物| 立秋那天吃什么| 办理护照需要什么手续| 甲状腺过氧化物酶抗体高说明什么问题| 芒果吃多了有什么坏处| 顾影自怜什么意思| 怀男孩和女孩有什么区别| 505是什么意思| 秦始皇原名叫什么名字| 戒指戴哪个手指代表什么| 晚上口渴是什么原因引起的| 老年骨质疏松疼痛有什么好疗法| 支那人是什么意思| 不典型鳞状细胞是什么意思| 细水长流是什么意思| icd医学上是什么意思| 甘油三酯高吃什么食物好| 不行是什么意思| 淘米水洗脸有什么作用与功效| 肺纹理增强是什么意思| 孕妇待产需要准备什么| 宛字五行属什么| 猪肝可以钓什么鱼| 为什么老被蚊子咬| 九浅一深是什么意思| 吆西是什么意思| 伟五行属什么| 刚怀孕吃什么好| 胸口长痘是什么原因| 频繁什么意思| 牙齿疼吃什么药| 为什么会得人工荨麻疹| 非萎缩性胃窦炎是什么意思| 比基尼是什么意思| 12月24号是什么星座| 脑震荡什么症状| 汗斑是什么| 一月27日是什么星座| 痰湿体质吃什么食物好| acs是什么意思| 测智力去医院挂什么科| 遗物是什么意思| 塔利班是什么| 什么样的人着床晚| 吃什么好排大便| 9月3日是什么纪念日| 榅桲是什么水果| 闰月给父母买什么| 紫薇什么意思| 蚊香对人体有什么危害| 维生素d有什么作用| 卡介苗是预防什么的| 室上性心动过速是什么原因引起的| 高血压检查什么项目| s925是什么金| 斯里兰卡说什么语言| 什么菜可以隔夜吃| 梦见自己大笑是什么意思| 心率不齐是什么原因| 水泡长什么样| 13是什么| 血常规能查出什么病| 查胆囊挂什么科| 血稠吃什么食物好得快| 玫瑰茄和洛神花有什么区别吗| o型b型生的孩子是什么血型| 下午四点到五点是什么时辰| 罗锅是什么意思| mhc是什么意思| 阿奇霉素治疗什么| 头皮发痒是什么原因引起的| 过劳肥是什么意思| 质数是什么| 宫颈欠光滑是什么意思| 右侧卵巢内囊性回声是什么意思| 胳膊上的花是打了什么疫苗| 手脱皮吃什么药| 双歧杆菌三联和四联有什么区别| 茶油是什么油| 牙冠什么材质的好| 脾大是什么原因造成的怎么治疗| 6月23号是什么日子| 红绿色盲是什么遗传病| 7月20号什么星座| 夜尿频多吃什么药效果好| 什么药能治阳痿早泄| 启读什么| 滢是什么意思| 为什么一喝牛奶就拉肚子| 复方氨酚烷胺片是什么药| 检查肾挂什么科| 贫血四项是指什么检查| 查生化是查些什么| 腠理是什么意思| 倪妮和倪萍什么关系| 什么东西补钙最好最快| 化疗后吃什么恢复快| 5.6是什么星座| 细菌高是什么原因| 淋球菌阳性是什么意思| 低血压吃什么补得最快| 人和是什么意思| 中国信什么教| 嫡孙是什么意思| 尿结晶是什么意思| 为什么今年有两个6月| 漏尿是什么原因造成的| 猫的祖先是什么动物| 紫得什么| 咽喉炎吃什么药有效| 甲鱼喜欢吃什么食物| 喉咙痒想咳嗽吃什么药| 女方什么人不能送亲| 1996年属鼠五行属什么| 吃什么补脑最快| 经常掉头发是什么原因| 腹腔淋巴结肿大是什么原因| 焦点是什么| 饭前饭后吃药有什么区别| 3月9日是什么星座| 什么叫做靶向治疗| 猫鼻支什么症状| darling是什么意思| 龟头瘙痒是什么原因| 中药地龙是什么| 一进去就射是什么原因| 最机灵的动物是什么生肖| 染色体是由什么组成的| 心率快吃什么中成药| 脾切除后有什么影响| 睡觉脚抽筋是什么原因引起的| ivf是什么意思| 微波炉什么牌子好| 夏天适合喝什么养生茶| 梦见买白菜是什么意思| 百度
Skip to main content

中国美术馆艺术讲堂 永恒的温度——重读路德...

百度 注重转变执法理念,夯实党建发展基础执法理念是作风建设的牛鼻子,是检察机关党建工作的坚实基石。

You can build search queries for the results you want with specialized code qualifiers, regular expressions, and boolean operations.

About code search query structure

The search syntax in this article only applies to searching code with GitHub code search. Note that the syntax and qualifiers for searching for non-code content, such as issues, users, and discussions, is not the same as the syntax for code search. For more information on non-code search, see About searching on GitHub and Searching on GitHub.

Search queries consist of search terms, comprising text you want to search for, and qualifiers, which narrow down the search.

A bare term with no qualifiers will match either the content of a file or the file's path.

For example, the following query:

http-push

The above query will match the file docs/http-push.txt, even if it doesn't contain the term http-push. It will also match a file called example.txt if it contains the term http-push.

You can enter multiple terms separated by whitespace to search for documents that satisfy both terms.

For example, the following query:

sparse index

The search results would include all documents containing both the terms sparse and index, in any order. As examples, it would match a file containing SparseIndexVector, a file with the phrase index for sparse trees, and even a file named index.txt that contains the term sparse.

Searching for multiple terms separated by whitespace is the equivalent to the search hello AND world. Other boolean operations, such as hello OR world, are also supported. For more information about boolean operations, see Using boolean operations.

Code search also supports searching for an exact string, including whitespace. For more information, see Query for an exact match.

You can narrow your code search with specialized qualifiers, such as repo:, language: and path:. For more information on the qualifiers you can use in code search, see Using qualifiers.

You can also use regular expressions in your searches by surrounding the expression in slashes. For more information on using regular expressions, see Using regular expressions.

Query for an exact match

To search for an exact string, including whitespace, you can surround the string in quotes. For example:

"sparse index"

You can also use quoted strings in qualifiers, for example:

path:git language:"protocol buffers"

Searching for quotes and backslashes

To search for code containing a quotation mark, you can escape the quotation mark using a backslash. For example, to find the exact string name = "tensorflow", you can search:

"name = \"tensorflow\""

To search for code containing a backslash, \, use a double backslash, \\.

The two escape sequences \\ and \" can be used outside of quotes as well. No other escape sequences are recognized, though. A backslash that isn't followed by either " or \ is included in the search, unchanged.

Additional escape sequences, such as \n to match a newline character, are supported in regular expressions. See Using regular expressions.

Using boolean operations

Code search supports boolean expressions. You can use the operators AND, OR, and NOT to combine search terms.

By default, adjacent terms separated by whitespace are equivalent to using the AND operator. For example, the search query sparse index is the same as sparse AND index, meaning that the search results will include all documents containing both the terms sparse and index, in any order.

To search for documents containing either one term or the other, you can use the OR operator. For example, the following query will match documents containing either sparse or index:

sparse OR index

To exclude files from your search results, you can use the NOT operator. For example, to exclude files in the __testing__ directory, you can search:

"fatal error" NOT path:__testing__

You can use parentheses to express more complicated boolean expressions. For example:

(language:ruby OR language:python) AND NOT path:"/tests/"

Using qualifiers

You can use specialized keywords to qualify your search.

Repository qualifier

To search within a repository, use the repo: qualifier. You must provide the full repository name, including the owner. For example:

repo:github-linguist/linguist

To search within a set of repositories, you can combine multiple repo: qualifiers with the boolean operator OR. For example:

repo:github-linguist/linguist OR repo:tree-sitter/tree-sitter

Note

Code search does not currently support regular expressions or partial matching for repository names, so you will have to type the entire repository name (including the user prefix) for the repo: qualifier to work.

Organization and user qualifiers

To search for files within an organization, use the org: qualifier. For example:

org:github

To search for files within a personal account, use the user: qualifier. For example:

user:octocat

Note

Code search does not currently support regular expressions or partial matching for organization or user names, so you will have to type the entire organization or user name for the qualifier to work.

Language qualifier

To narrow down to a specific languages, use the language: qualifier. For example:

language:ruby OR language:cpp OR language:csharp

For a complete list of supported language names, see languages.yaml in github-linguist/linguist. If your preferred language is not on the list, you can open a pull request to add it.

Path qualifier

To search within file paths, use the path: qualifier. This will match files containing the term anywhere in their file path. For example, to find files containing the term unit_tests in their path, use:

path:unit_tests

The above query will match both src/unit_tests/my_test.py and src/docs/unit_tests.md since they both contain unit_test somewhere in their path.

To match only a specific filename (and not part of the path), you could use a regular expression:

path:/(^|\/)README\.md$/

Note that the . in the filename is escaped, since . has special meaning for regular expressions. For more information about using regular expressions, see Using regular expressions.


You can also use some limited glob expressions in the path: qualifier.

For example, to search for files with the extension txt, you can use:

path:*.txt

To search for JavaScript files within a `src` directory, you could use:
path:src/*.js
  • By default, glob expressions are not anchored to the start of the path, so the above expression would still match a path like app/src/main.js. But if you prefix the expression with /, it will anchor to the start. For example:

    path:/src/*.js
    
  • Note that * doesn't match the / character, so for the above example, all results will be direct descendants of the src directory. To match within subdirectories, so that results include deeply nested files such as /src/app/testing/utils/example.js, you can use **. For example:

    path:/src/**/*.js
    

You can also use the ? global character. For example, to match the path file.aac or file.abc, you can use:

path:*.a?c

To search for a filename which contains a special character like `*` or `?`, just use a quoted string:
path:"file?"

Glob expressions are disabled for quoted strings, so the above query will only match paths containing the literal string file?.

Symbol qualifier

You can search for symbol definitions in code, such as function or class definitions, using the symbol: qualifier. Symbol search is based on parsing your code using the open source Tree-sitter parser ecosystem, so no extra setup or build tool integration is required.

For example, to search for a symbol called WithContext:

language:go symbol:WithContext

In some languages, you can search for symbols using a prefix (e.g. a prefix of their class name). For example, for a method deleteRows on a struct Maint, you could search symbol:Maint.deleteRows if you are using Go, or symbol:Maint::deleteRows in Rust.

You can also use regular expressions with the symbol qualifier. For example, the following query would find conversions people have implemented in Rust for the String type:

language:rust symbol:/^String::to_.*/

Note that this qualifier only searches for definitions and not references, and not all symbol types or languages are fully supported yet. Symbol extraction is supported for the following languages:

  • Bash
  • C
  • C#
  • C++
  • CodeQL
  • Elixir
  • Go
  • JSX
  • Java
  • JavaScript
  • Lua
  • PHP
  • Protocol Buffers
  • Python
  • R
  • Ruby
  • Rust
  • Scala
  • Starlark
  • Swift
  • Typescript

We are working on adding support for more languages. If you would like to help contribute to this effort, you can add support for your language in the open source Tree-sitter parser ecosystem, upon which symbol search is based.

Content qualifier

By default, bare terms search both paths and file content. To restrict a search to strictly match the content of a file and not file paths, use the content: qualifier. For example:

content:README.md

This query would only match files containing the term README.md, rather than matching files named README.md.

Is qualifier

To filter based on repository properties, you can use the is: qualifier. is: supports the following values:

  • archived: restricts the search to archived repositories.
  • fork: restricts the search to forked repositories.
  • vendored: restricts the search to content detected as vendored.
  • generated: restricts the search to content detected as generated.

For example:

path:/^MIT.txt$/ is:archived

Note that the is: qualifier can be inverted with the NOT operator. To search for non-archived repositories, you can search:

log4j NOT is:archived

To exclude forks from your results, you can search:

log4j NOT is:fork

Using regular expressions

Code search supports regular expressions to search for patterns in your code. You can use regular expressions in bare search terms as well as within many qualifiers, by surrounding the regex in slashes.

For example, to search for the regular expression sparse.*index, you would use:

/sparse.*index/

Note that you'll have to escape any forward slashes within the regular expression. For example, to search for files within the App/src directory, you would use:

/^App\/src\//

Inside a regular expression, \n stands for a newline character, \t stands for a tab, and \x{hhhh} can be used to escape any Unicode character. This means you can use regular expressions to search for exact strings that contain characters that you can't type into the search bar.

Most common regular expressions features work in code search. However, "look-around" assertions are not supported.

Separating search terms

All parts of a search, such as search terms, exact strings, regular expressions, qualifiers, parentheses, and the boolean keywords AND, OR, and NOT, must be separated from one another with spaces. The one exception is that items inside parentheses, ( ), don't need to be separated from the parentheses.

If your search contains multiple components that aren't separated by spaces, or other text that does not follow the rules listed above, code search will try to guess what you mean. It often falls back on treating that component of your query as the exact text to search for. For example, the following query:

printf("hello world\n");

Code search will give up on interpreting the parentheses and quotes as special characters and will instead search for files containing that exact code.

If code search guesses wrong, you can always get the search you wanted by using quotes and spaces to make the meaning clear.

Case sensitivity

By default, code search is case-insensitive, and results will include both uppercase and lowercase results. You can do case-sensitive searches by using a regular expression with case insensitivity turned off. For example, to search for the string "True", you would use:

/(?-i)True/
丘疹性荨麻疹用什么药 肾病钾高吃什么食物好 没必要什么意思 什么发什么强 edc是什么
生殖感染用什么消炎药效果好 amk是什么品牌 生菜是什么菜 甚好是什么意思 什么药止痒效果最好
多发肿大淋巴结是什么意思 尿不出尿是什么原因 孕妇早上吃什么早餐好 什么是几何图形 形同陌路什么意思
程五行属什么 玄府指的是什么 小便有点刺痛是什么原因引起的 心魔是什么意思 脾湿吃什么中成药
阳光灿烂是什么意思hcv8jop1ns6r.cn 肤色暗黄适合穿什么颜色的衣服hcv8jop8ns6r.cn 溴隐亭是什么药hcv8jop4ns4r.cn 为什么喝中药越来越胖hcv8jop9ns5r.cn 菠菜什么季节吃hcv9jop0ns0r.cn
视力5.3是什么概念hcv9jop0ns3r.cn 虚劳病是什么病hcv8jop2ns2r.cn 小祖宗是什么意思hcv8jop2ns2r.cn 十月份出生的是什么星座hcv9jop7ns4r.cn 什么补钾最快hcv8jop3ns8r.cn
淋巴滤泡增生用什么药能彻底治愈hcv7jop6ns6r.cn 鸡皮肤用什么药膏最好hcv8jop3ns2r.cn 百米12秒什么水平hcv8jop2ns2r.cn 无痛人流后需要注意什么hcv8jop1ns3r.cn 38岁属什么生肖hcv8jop1ns8r.cn
走马观花是什么意思hcv8jop9ns8r.cn 琴棋书画指的是什么hcv9jop0ns8r.cn 什么叫双相障碍bjcbxg.com 白羊座后面是什么星座hcv8jop8ns3r.cn 什么食物养胃又治胃病hanqikai.com
百度