纵隔是什么意思| 鸟进屋有什么预兆| 态度是什么| 太阳线是什么意思| 郑州有什么大学| 蛋白烫发是什么意思| 红枣和什么不能一起吃| 买什么样的老花镜好| 羽字属于五行属什么| 炖羊汤放什么调料| hr什么意思| 打更的人叫什么| 嘴唇暗紫色是什么原因| 大便干燥一粒一粒的是什么原因| 鲮鱼是什么鱼| 粗脖子病是什么原因引起的| 化验肝功挂什么科| 荆芥俗名叫什么| 外耳道耵聍什么意思| 申请低保需要什么条件| 妨夫痣是什么意思| 感冒吃什么消炎药| 梦到妈妈怀孕什么预兆| 无动于衷是什么意思| beams是什么品牌| 头臂长是什么意思| 贫血严重会导致什么后果| 名不见经传是什么意思| 脾胃不和吃什么中成药| rh血型阳性是什么血型| 阿华田是什么| 流虚汗是什么原因| 市盈率和市净率是什么意思| 手指甲有黑色条纹是什么原因| 后羿射日告诉我们什么道理| 印度讲什么语言| 为什么会得多囊| 陈皮为什么越陈越好| 天津五行属什么| 尿酸高要注意什么| 落汤鸡是什么意思| 为什么手机充电慢| 中国中铁是做什么的| 神母是什么病| 拉肚子应该吃什么药| 中水是什么水| 瞅瞅是什么意思| 猫爱吃什么| 惹上官司是犯了什么煞| 嗷嗷待哺是什么意思| 见利忘义是什么生肖| 羁什么意思| 吃三七粉不能吃什么| 什么物流寄大件便宜| 动脉硬化挂什么科| 天蝎座女生配什么星座| 切记是什么意思| 你什么意思| bug是什么意思网络用语| 好看是什么意思| 什么是呼吸性碱中毒| 腰肌劳损是什么症状| Iud是什么| 12月4日是什么日子| 放屁特别臭是什么原因| 绍兴本地人喝什么黄酒| 宫腔内囊性结构是什么意思| 指甲上的白色月牙代表什么| 贫血会出现什么症状| 胸内科主要看什么病| 尿酸高是什么引起的| 赭色是什么颜色| 体育总局局长什么级别| 吉可以加什么偏旁| 9月3号是什么日子| 颈静脉怒张见于什么病| 松鼠吃什么食物| 做什么检查确诊是白塞| 愚昧什么意思| 爱的本质是什么| 苯磺酸氨氯地平片什么时候吃| 四个人念什么| 剪切是什么意思| 松解手术是什么| 子宫有问题有什么症状| 3月9号是什么星座| 洁面慕斯和洗面奶有什么区别| 肛瘘挂什么科| 急性肠胃炎吃什么药| 人情味是什么意思| 尿偏红色是什么原因| 孤家寡人什么意思| 维生素b族什么时候吃效果最好| 右乳钙化灶是什么意思| 鱼露可以用什么代替| 骨骼是什么意思| 拍大腿内侧有什么好处| 汗斑用什么药膏好| 内痔疮吃什么药最好| 蝌蚪吃什么食物| 睾丸疼挂什么科| 梦见一条小蛇是什么意思| 左眼跳什么意思| 批准文号是什么| 什么的笑| 什么盐好| pla是什么意思| 为什么会得肾结石| 蟾宫是什么意思| 办理身份证需要什么| 十恶不赦是什么意思| 细菌性阴道炎用什么药好| 失眠吃什么中药调理效果快| 美妞是什么意思| 1953年属什么| 肺气不足吃什么中成药| sany是什么牌子| 省委副书记是什么级别| 一劳永逸什么意思| 颜狗是什么意思| 福建人喜欢吃什么口味| 正佳广场有什么好玩的| 文采是什么意思| 小孩腿抽筋是什么原因引起的| 肠炎用什么药好| 腰痛宁为什么晚上吃| sb是什么元素符号| 偏头痛看什么科| 贫血要注意些什么| 螨虫什么样子| 眼视光医学是干什么的| 经常头疼什么原因| 山东有什么特产| 吃什么补充膝盖润滑液| 花是什么意思| 梦见自己怀孕生孩子是什么意思| 端午节在什么时候| 怀孕二十天有什么反应| 什么炎炎| 拉屎擦屁股纸上有血什么原因| mon什么意思| 月经太多是什么原因| 治疗阳痿早泄用什么药| 什么充电宝能带上飞机| 站着说话不腰疼是什么意思| 心神不宁是什么意思| 肺部结节灶是什么意思啊| 张顺的绰号是什么| 月经推迟半个月是什么原因| 兆后面的单位是什么| 医学ac是什么意思| 湿热内蕴证有什么症状| 199年属什么生肖| 涤棉是什么材质| 资金流入股价下跌为什么| 脚肿吃什么药消肿| 脚趾甲变黑是什么原因| 什么烟最便宜| 什么东西泡水喝降血压| 吐槽什么意思| 喝什么可以美白| 马来玉是什么玉| 男生被口什么感觉| 胸痛是什么原因导致的| 航母舰长是什么级别| 肚脐眼连接体内的什么器官| 豆汁是什么做的| 有什么好看的动漫| 肠穿孔有什么症状| 什么的成长| 用什么刷牙能使牙齿变白| 拉血是什么病| 脊柱侧弯挂什么科| 血药浓度是什么意思| 什么是宫腔镜检查| 智商105是什么水平| co是什么元素| 蛇喜欢吃什么食物| 哪吒代表什么生肖| 内急是什么意思| 怕冷是什么原因| 23333是什么意思| 小插曲是什么意思| 长期咳白痰是什么原因| 雨露是什么意思| 日斤读什么字| 北豆腐是什么| 女生下面什么样| 腿上的肉疼是什么原因| 六月初六什么日子| singing是什么意思| 什么样的小手| 烂大街是什么意思| 黄体破裂是什么原因造成的| 扁桃体结石是什么原因引起的| 硫脲是什么| 烦恼千千是什么生肖| 黄体什么意思| 吃什么补精最快| 做梦梦到掉牙齿是什么意思| 奶绿是什么| 脚上长鸡眼是什么原因| 人什么什么什么| 晒伤用什么药| 摩羯座的幸运色是什么| 氯化钙是什么| 什么是单亲家庭| 为什么老是犯困想睡觉| 为什么会打喷嚏| 蒙古国什么时候独立的| 为什么今年夏天特别热| 一直打嗝不止是什么原因| 99朵玫瑰花代表什么| 上胸围90下胸围80是什么罩杯| 声嘶力竭是什么意思| 孙武和孙膑是什么关系| 去拉萨需要准备什么| 支原体吃什么药好得快| 牛牛是什么| 免疫力是什么| 鸦片鱼又叫什么鱼| 地贫是什么病| 骞字五行属什么| 男性检查男科都查什么| 企鹅吃什么食物| 肚子突然疼是什么原因| 手麻脚麻是什么病| wink是什么意思| 放风是什么意思| 头皮痒挂什么科| 嗨体水光针有什么功效| 伶字五行属什么| 人活着为了什么| 头晕眼睛模糊是什么原因| 尿蛋白是什么意思| 扌字旁的字和什么有关| 白带黄什么原因| 公务员和事业编有什么区别| 因果关系是什么意思| 史诗级什么意思| 双鱼座有什么特点| 属龙和什么属相最配| 心脏早搏吃什么药| 黄色配什么颜色最好看| 什么叫台风| 汕头有什么好玩的景点| 四肢无力是什么病| 总是睡不着觉是什么原因| 脸上长痣是什么原因造成的| 初级会计什么时候拿证| 塞来昔布是什么药| 脚烧热是什么原因| obl是什么意思| 洒水车的音乐是什么歌| 人肉搜索是什么| 尿道感染挂什么科| 身上为什么老是痒| 拔牙后不能吃什么食物| 1940年出生属什么生肖| aj和nike什么关系| 双子座男和什么座最配对| 供血不足吃什么药效果最好| 什么的时间| 每天早上喝一杯蜂蜜水有什么好处| 百度
Skip to main content

广电豪赌1000亿建互联互通平台 2020年全国一..

百度   据了解,自从阅兵训练基地确定在昌平后,昌平消防支队即启动安全保障,416名消防员全员停休,每日按照指定区域巡逻防控。

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/
一品诰命夫人是什么意思 日代表什么生肖 黄芪煲汤和什么搭配 血糖高是什么原因引起的 le是什么
翼龙吃什么食物 体检去医院挂什么科 尿频是什么原因 痰培养是检查什么的 什么病不能吃狗肉
增加性功能吃什么药 外围是什么意思 尿糖阳性是什么意思 枪灰色是什么颜色 什么是妇科病
10月30日是什么星座 miu是什么意思 为什么会得肺结核 心火吃什么药 尿路感染是什么原因造成的
甲状腺结节吃什么hcv9jop1ns1r.cn 喇叭裤配什么上衣shenchushe.com 京豆有什么用hcv7jop7ns0r.cn 升天是什么意思hcv7jop6ns1r.cn 天津古代叫什么hcv9jop2ns2r.cn
梦见水代表什么hcv9jop7ns9r.cn 护理假是什么意思hcv9jop1ns3r.cn 报考军校需要什么条件aiwuzhiyu.com 胃疼可以吃什么药hcv8jop4ns5r.cn 机不可失的下一句是什么hcv9jop6ns0r.cn
黑加出念什么hcv8jop7ns0r.cn 指甲空了是什么原因hcv8jop2ns3r.cn 深静脉血栓有什么症状hcv9jop4ns0r.cn 什么是紫外线huizhijixie.com 大便发黑是什么原因hcv8jop5ns8r.cn
眼睛经常有眼屎是什么原因hcv9jop5ns9r.cn 四大美女指什么生肖hcv8jop3ns3r.cn 骨折吃什么水果好hcv7jop5ns1r.cn 下海什么意思hcv8jop8ns7r.cn 舌头发黄是什么病hcv9jop3ns6r.cn
百度