干咳吃什么药止咳效果好| 骨折一个月能恢复到什么程度| 出cos是什么意思| 全腹部ct平扫主要检查什么| 什么是节气| 冬瓜吃了有什么好处| 土中金是什么生肖| 猪八戒的老婆叫什么| 邪火是什么意思| 贝壳是什么垃圾| afi是胎儿的什么意思| 胆挂什么科| 蜜蜡是什么材质| 晕车药叫什么名字| onlycook是什么牌子| 雨露均沾是什么意思| 吃什么清肺效果最好| 皮肤细菌感染用什么药| rh血型阳性是什么意思| 酵母菌是什么菌| 考试早餐吃什么| 为什么静脉曲张| 血便是什么原因引起的| 手足口疫苗什么时候打| 好汉不吃眼前亏是什么意思| 阴茎硬度不够吃什么好| 流云是什么意思| 一叶知秋下一句是什么| 山楂和什么泡水喝减肥效果最好| 手足口病忌口什么食物| 月经第二天是什么期| 稚嫩是什么意思| 窦骁的父母是干什么的| 下巴上有痣代表什么| 大枕大池是什么意思| 脸上长癣是什么原因造成的| 高压氧是什么| 胎菊泡水喝有什么功效| lcr是什么意思| 身上总是痒是什么原因| 下巴反复长痘痘是什么原因| 9号来的月经什么时候是排卵期| 摄取是什么意思| 社保卡是什么意思| 嗓子老有痰是什么原因| 玛卡是什么药| 属虎的生什么属相的宝宝好| 天珠有什么作用与功效| 突然腰疼是什么原因| 镜子是用什么做的| 八月份什么星座| 好文采是什么意思| 猪沙肝是什么部位| 12月27日是什么星座| 心慌出虚汗是什么原因| 血管堵塞吃什么药好| 梦见肉是什么意思| 晕车的人是什么体质| 草木皆兵什么意思| 徐峥的老婆叫什么名字| 一什么水| 什么什么自语| 什么叫皈依| 独生子女证有什么用| 早泄是什么症状| 腹泻肚子疼吃什么药| 玻尿酸是什么东西| 常熟有什么好玩的地方| 手术后吃什么水果| 看血脂高挂什么科| 80岁属什么生肖| 纾字五行属什么| 女生下面是什么样的| 化妆水是什么| 儿童吃什么长个子最快| 舌根放血有什么好处| 庸人自扰是什么意思| 格力空调se是什么意思| 这个季节适合种什么蔬菜| 老年人全身无力是什么原因| 三百多分能上什么大学| 健康的舌苔是什么样的| 凌波仙子指的是什么花| congee是什么意思| 埃及艳后叫什么| 宫腔镜手术是什么原因才要做| 辱骂是什么意思| 图片px是什么意思| 特发性震颤是什么病| 异口同声是什么意思| nmol是什么单位| 花裤子配什么上衣| 脂肪肝喝什么茶最好最有效| 抽烟是什么感觉| fleece是什么面料| 胃蛋白酶原1偏低是什么意思| 欲购从速什么意思| 空腹喝啤酒有什么危害| dha是什么| 女生下体长什么样| 离婚要什么手续和证件| 朱元璋为什么杀李善长| 千米的字母是什么| 煮牛肉放什么容易烂| 扩词是什么| 1965年属什么生肖| 眼睛有黑影是什么原因| 葫芦鸡为什么叫葫芦鸡| 血压高压低是什么原因| 权衡利弊的意思是什么| 乳房疼挂什么科室| 右小指麻木是什么征兆| 睡眠不好吃什么药| 结节灶是什么意思啊| 没有鱼鳞的鱼是什么鱼| 女鼠和什么属相最配对| 人类的祖先是什么生肖| 土地出让金是什么意思| 米索前列醇片是什么药| 癌胚抗原是什么意思| 茧是什么意思| 梦见手链断了是什么意思| 结梁子什么意思| 现在什么最赚钱| 挂面是什么面| 对对子是什么意思| 经常打嗝放屁是什么原因| 湿疹是因为什么引起的| 大象是什么颜色| 敌对是什么意思| 闭关是什么意思| 黄体囊肿是什么意思| 走投无路是什么意思| 世界上什么动物牙齿最多| 治便秘什么药最好| 溢字五行属什么| 道德制高点什么意思| 例假什么意思| 手指甲有竖纹是什么原因| 流黄鼻涕是什么感冒| 跳蛋什么意思| 马铃薯是什么| 音字五行属什么| 吹牛皮是什么意思| 半夜两点是什么时辰| si是什么元素| 副师长是什么级别| 犯月是什么意思| 野人是什么意思| 睡多了头疼是什么原因| 一个王一个番读什么| 女人体检都查什么项目| 手指发麻是什么原因| 想吃咸的是身体缺什么| 血小板体积偏低是什么原因| 私处瘙痒用什么药| 文房四宝是什么| 什么人不能喝桑黄| 今年83岁属什么生肖| 身上为什么会长小肉球| 第六感是什么意思| 小拇指旁边的手指叫什么| 无名指是什么经络| 肚子特别疼是什么原因| 黄金为什么这么贵| 眼神迷离是什么意思| 02年是什么生肖| 聚酯纤维是什么面料| 长方形纸能折什么| hpv53阳性是什么意思| 雄鹰是什么意思| 孔雀开屏什么意思| 范思哲香水是什么档次| 馋肉是身体里缺什么| 胚由什么组成| 什么是腺肌症| 孕妇晚上饿了吃什么好| min是什么| 激素六项是查什么的| 一度房室传导阻滞是什么意思| 肠炎挂什么科| 邮政ems是什么意思| 什么叫子宫腺肌症| 惟妙惟肖什么意思| 清真食品是什么意思| 牙套什么年龄戴合适| 澳大利亚说什么语| 闲云野鹤是什么意思| 梦见下小雨是什么征兆| 月经来了不能吃什么东西| 天天喝牛奶有什么好处| 这个季节适合种什么菜| 胸下面是什么部位| 孕妇口腔溃疡能用什么药| 阴部痒痒的是什么原因| 鬼畜是什么意思| 尿结晶是什么意思| 朱元璋为什么杀徐达| 三餐两点什么意思| 什么车子寸步难行脑筋急转弯| 锋芒的意思是什么| 触霉头是什么意思| 为什么一动就满头大汗| 伤官配印是什么意思| 猫便秘吃什么最快排便| 女人肾虚是什么原因| 白色虫子是什么虫图片| zoe什么意思| 中枢是什么意思| 唐朝为什么灭亡| 农历八月初三是什么星座| 肺实性结节是什么意思| 起床口苦是什么原因| 女人脾肾两虚吃什么好| 北属于五行的什么| 看舌头挂什么科| ofs是什么意思| 情妇是什么意思| 珠联璧合是什么意思| 腹直肌是什么| 12月2日什么星座| 霉菌性阴道炎用什么洗液好| 松花粉有什么功效| 珠海有什么好玩的| 有白痰是什么原因| 猫叫什么名字好听| 女人吃鹿鞭有什么好处| 7月14日什么节日| 便血挂什么科| 婴儿什么时候开始认人| 糖类抗原高是什么意思| 一夜白头是什么原因| 颢读什么| 流产什么样的症状表现| 吃什么可以变白| 难怪是什么意思| 猪肚和什么煲汤最好| 内裤发黄是什么原因| 投行是做什么的| 发呆是什么意思| 脑震荡挂什么科| 虾不能和什么东西一起吃| 奶豆腐是什么| 獐子是什么动物| 冬字五行属什么| 真菌感染用什么药好| 人贫血吃什么补得快| 国安是什么单位| 失格是什么意思| 木命人五行缺什么| 氟化钠是什么| 丙氨酸氨基转移酶高是什么意思| 弥漫是什么意思| ga是什么牌子| 画地为牢是什么意思| 为什么有的人怎么吃都不胖| 眼压是什么| 荷叶又什么又什么| 蝙蝠飞进家里预示什么| 左是什么结构的字| b像什么| 10mg是什么意思| 动物的脖子有什么作用| 什么样的男人不能嫁| 百度
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/
伏笔是什么意思 洋葱吃了有什么好处 查转氨酶挂什么科 长期服用二甲双胍有什么副作用 scc什么意思
不甚感激是什么意思 什么是提肛运动 otc药是什么意思 9月17号是什么星座的 姜红枣红糖一起煮有什么效果
晚上很难入睡是什么原因 眼睛充血是什么原因 女性阴部潮湿是什么原因 什么动物是爸爸生的 身体潮湿是什么原因
老母鸡煲汤放什么食材补气补血 男属兔和什么属相最配 碗摔碎了预示着什么 什么样的房子不能住人脑筋急转弯 糖化血红蛋白高是什么原因
后背有痣代表什么travellingsim.com 眼睛痒用什么眼药水好hcv9jop1ns9r.cn 虫草对身体有什么好处hcv8jop9ns4r.cn 为什么会尿频尿急hcv8jop6ns1r.cn 沈字五行属什么hcv9jop1ns3r.cn
看病人买什么水果yanzhenzixun.com sparkling是什么意思hcv9jop1ns0r.cn 坐班是什么意思hcv7jop6ns7r.cn 呼吸性碱中毒吃什么药huizhijixie.com 八仙过海是什么意思yanzhenzixun.com
脑供血不足用什么药hcv9jop5ns3r.cn 酸奶和牛奶有什么区别hcv9jop0ns3r.cn 痰是绿色的是什么原因hcv9jop2ns8r.cn sry什么意思hcv8jop0ns9r.cn 过敏打什么针hcv8jop1ns8r.cn
耳朵大代表什么0735v.com 乙肝两对半阴性是什么意思hcv8jop0ns5r.cn 什么是胰腺hcv9jop2ns3r.cn 喝酒前吃什么不容易醉kuyehao.com bang是什么意思520myf.com
百度