一个口一个麦念什么| cip号是什么| journey是什么意思| 知了猴是什么东西| 尼泊尔属于什么国家| 孕妇羊水少吃什么补的快| 什么降压药副作用小且效果最好| 高反人群一般是什么人| 孕妇缺营养吃什么补| 1958属什么生肖| 鱼跳出鱼缸有什么征兆| 喝酒喝多了有什么危害| 满清十大酷刑是什么| 旦上面加一横是什么字| 固摄是什么意思| 什么品牌的冰箱好| 虞是什么意思| 梦见楼塌了是什么意思| mic是什么意思| 蚁后长什么样| 腻害什么意思| 尿常规能检查出什么| 日常是什么意思| 照看是什么意思| 神经性皮炎用什么药膏好| 什么叫入伏| 肚脐眼连接体内的什么器官| 囊壁钙化是什么意思| 棕色搭配什么颜色好看| 咳嗽吃什么食物| 清肺热用什么泡水喝比较好| 霜降是什么意思| 舒筋健腰丸主治什么| 为什么叫马路| 珍母口服液有什么作用| 蓝色加红色是什么颜色| 子宫小是什么原因引起的| 腰椎盘突出挂什么科| dwi是什么检查| 考护师需要什么条件| 什么山不能爬脑筋急转弯| 断片是什么意思| 高血压吃什么盐比较好| 属鸡适合佩戴什么饰品| a型血的人容易得什么病| 田七和三七有什么区别| 洗白是什么意思| 什么的迎春花| xxoo什么意思| 君子兰用什么土最好| 耐力板是什么材质| 阴阳两虚吃什么| 鸡黍是什么意思| 结核菌是什么| 愿字五行属什么| 中医是什么| hdv是什么病毒| 人出现幻觉是什么原因| a股是什么意思| 卵泡期是什么时候| csf是什么意思| 老鼠尿是什么颜色的| 自信是什么意思| 核磁和ct有什么区别| 十二月十号是什么星座| 芳菲是什么意思| 一孕傻三年是什么意思| 六月份生日是什么星座| 急性肠胃炎打什么点滴| p53野生型是什么意思| 舌苔发黄吃什么药| 水疱疹什么药最快能治好| 纳尼是什么意思| 苏打和小苏打有什么区别| 摩羯座是什么动物| 软下疳是什么症状| 裕字五行属什么| 什么叫腺瘤| 孤独的最高境界是什么| 己亥是什么意思| 侧睡流口水是什么原因| 什么成什么就| 上嘴角有痣代表什么| 算力是什么| 前列腺炎吃什么药最有效| 那敢情好是什么意思| 6月是什么星座| 因祸得福是什么意思| 拉肚子拉稀是什么原因| 医院规培是什么意思| 女人梦到蛇是什么意思| 四级什么时候报名| 骨头属于什么垃圾| 脉搏强劲有力代表什么| 内热是什么原因引起的怎么调理| iv是什么意思| 什么是时装| 吃什么降火| 白细胞低吃什么补| 淋病和梅毒有什么区别| 什么时间量血压最准| 吃什么可以排毒| 为什么不敢挖雍正陵墓| 萱五行属什么| 1989年出生是什么命| 干呕是什么原因| 鲤鱼吃什么| 两个人在一起的意义是什么| 骨质疏松有什么症状表现| 住房公积金缴存基数是什么意思| 卡鱼刺去医院挂什么科| 木石是什么字| 吃醋对身体有什么好处| 嘴里甜是什么原因| 一什么陆地| 双瞳电影到底讲了什么| 两个大于号是什么车| 孩子生化了是什么意思| 山茱萸的功效与作用是什么| vcr什么意思| 木瓜什么时候成熟| 脑供血不足头晕吃什么药| 天上为什么有星星| 衣原体感染是什么意思| 三伏天喝什么汤最好| 喝蒲公英有什么好处| 早上5点多是什么时辰| 参片泡水喝有什么功效| 头皮痒是什么原因引起的| 淋巴细胞升高说明什么| 什么是初心| 腿疼挂什么科| 搞破鞋是什么意思| 喜悦之情溢于言表什么意思| 三叉神经痛吃什么药| 李子吃了有什么好处| 阑尾炎能吃什么水果| 大芒果是什么品种| 田螺吃什么| 甲功能5项检查是查的什么| 怀孕都有什么症状| 白麝香是什么味道| 孙武和孙膑是什么关系| 唐人是什么意思| 壶承是什么| 白天不咳嗽晚上咳嗽吃什么药| 惊喜的英文是什么| 啵是什么意思| 六个点是什么意思| 缺铁性贫血吃什么食物好| 谨记的意思是什么| 两个a型血的人生的孩子什么血型| 曾舜晞是什么星座| 什么什么大名| 心阴虚吃什么中成药| 煮粥用什么米| 右位主动脉弓是什么意思| 流口水是什么原因| 胸闷想吐是什么原因| 小便解不出来是什么原因| 六畜大宝在农家是什么生肖| 鸡精吃多了有什么危害| 扁平苔藓有什么症状| 社保指什么| 红花泡水喝有什么功效和作用| 魔性是什么意思| 司南是什么| 氟斑牙是什么原因造成的| 为什么讨厌犹太人| 六月初六是什么节| 龙代表什么数字| 天牛吃什么食物| 龟公是什么意思| 半夜饿了吃什么不长胖| 纯粹的人是什么性格| pubg是什么意思| 横纹肌溶解什么意思| 性生活什么意思| 全麻对身体有什么危害| 吃什么东西补血最快最有效| 什么东西能吃能喝又能坐| 榴莲蜜什么味道| 腿麻是什么病的前兆| 腰间盘突出压迫神经什么症状| 大暑是什么时候| 肛门痒用什么药| 脚趾麻木是什么病先兆| 秦昊的父母是干什么的| 为什么一照相脸就歪了| 汗臭味很重是什么原因引起的| 喝酒不能吃什么东西| 五月二十日是什么日子| 包子有什么馅的| 2007年属什么| 清水文是什么意思| 完谷不化吃什么中成药| 甘油三酯是指什么| 兄长是什么意思| 泥鳅不能和什么一起吃| 试管是什么| 易出汗是什么原因| 生化常规主要是检查什么的| 什么不绝| 皋读什么| 扁平疣用什么药膏| 小孩磨牙是什么原因引起的| 阑尾炎看什么科室| 水瓶男和什么星座最配| 7月25号是什么星座| 璨字五行属什么| 胆固醇高吃什么可以降下来| 总做噩梦是什么原因| 脚肿挂什么科室| 肝炎吃什么药最好| 杜甫被称为什么| 百字五行属什么| 中单是什么意思| 血糖用什么字母表示| 男人的精子对女人有什么好处| 淼念什么| 手为什么会抖| 关二爷是什么神| 附件炎是什么| 为什么德牧不能打| 藏毛窦挂什么科| 一人吃饱全家不饿是什么生肖| 马六甲板材是什么木材| 经常口臭的人是什么原因引起的| 晚上20点是什么时辰| 什么是脱敏| 二杠四星是什么军衔| 杨玉环属什么生肖| 11点到12点是什么时辰| 跳蚤是什么| 吸入甲醛会有什么症状| 总胆红素高是什么病| 为什么一吃辣的就拉肚子| lv什么牌子| 獐子是什么动物| 伯爵是什么意思| naco3是什么| 大步向前走永远不回头是什么歌| 苏州机场叫什么名字| 低血钾吃什么补上来的快| 阴囊上长了几根白毛是什么原因| 风的孩子叫什么| mri是什么检查项目| 盆腔炎挂什么科| 三什么什么什么成语| 骨折后吃什么食物促进骨头愈合| 中规中矩是什么意思| 放化疗期间吃什么好| 指甲变黑是什么原因| 灵魂伴侣是什么意思| 小孩经常发烧是什么原因| 什么是免疫组化检查| 2月出生是什么星座| 什么是g点| 心结是什么意思| 为什么我的| 睡觉盗汗是什么原因| 孕妇能吃什么| 什么食物含维生素b12最多| 毒灵芝长什么样| 百度
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/
口腔有异味是什么原因引起的 风平浪静是什么生肖 协调什么意思 速干裤是什么面料 猪肉不能和什么一起吃
养肝吃什么食物 1963年属兔的是什么命 农历正月十五吃什么 4c是什么 avg是什么意思
养神经的药是什么药最好 slogan什么意思 开颌是什么意思 1998年属什么生肖 芒果吃了有什么好处
缘木求鱼什么意思 为什么有蟑螂 丝光棉是什么面料 三白眼是什么意思 乙肝两对半挂什么科
幼儿急疹吃什么药xinjiangjialails.com 桃和什么不能一起吃hcv7jop6ns2r.cn ng什么意思hcv8jop5ns2r.cn 经常吃海带有什么好处和坏处hcv8jop4ns4r.cn 什么药治便秘最好最快shenchushe.com
皮包公司是什么意思hcv9jop1ns9r.cn 什么叫萎缩性胃炎hcv9jop5ns8r.cn 血便是什么原因引起的hcv7jop9ns3r.cn 不复相见什么意思hcv8jop8ns9r.cn 女性尿频尿急吃什么药bfb118.com
什么是黑天鹅事件hcv8jop2ns9r.cn 蝙蝠属于什么类hcv8jop0ns0r.cn 张国荣属什么生肖hcv8jop1ns0r.cn 红楼梦贾家为什么被抄家hcv9jop3ns2r.cn 脖子痒是什么原因hcv9jop1ns9r.cn
乳糖不耐受喝什么牛奶hcv9jop2ns2r.cn 睡不着觉什么原因chuanglingweilai.com 什么是结缔组织病hcv8jop0ns6r.cn 三班两倒是什么意思hcv8jop8ns5r.cn 什么目什么身hcv8jop9ns9r.cn
百度