中划线 下划线, hyphens “-", underscores “_”

中划线

无法双击全部选中。

中横线是: hyphen 比如说 red-headed 中的这个 “-”

而其他同志们回答的 dash 是指中文里面的破折号 —, 比hyphen要长一些.

复合词可以使用中划线。

story-book

get-together

get-together 是一个英文单词,读音是英[ɡet tə'ɡeðə(r)]、美[ˈɡɛttəˌɡɛðɚ],意思是聚会、联欢会。

story-book 英 [ˈstɔːri bʊk] 美 [ˈstɔːri bʊk] 故事书;故事書;故事乢;故事级

下横线, underscore, _

示例: Steven_Chen

我们通常认为的 underline 是在一个词语或是句子下面表示强调的, 和这个下横线不同的.

———————————————— 版权声明:本文为CSDN博主「小崔Bro」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/jsloveyou/article/details/117282922

hyphen和dash区别 连字符: non-smoker 中是 hyphen 波折号: 1928-2008 中是 dash

https://www.jianshu.com/p/1368059e296b

SEO

Google 搜索引擎会将 _ 连接的单词作为一个单词。比如搜索 web_site 实际上只会找关键词 website。 只有 web-site 会分为 web 和 site 来查找。即:

This_is_a_single_word This-is-a-sentence-with-multiple-words

英文文法 如果既不需要关心搜索引擎,也不需要关心编程语言环境的问题。那么就考虑英文文法。 连字符在英文里是有意义的,比如复合词,例如

upper-case letter non-English-speaking peoples the post–World War II years a hospital–nursing home connection a nursing home–home care policy a quasi-public–quasi-judicial body 为了保留连字符在复合词的作用,那么文件命名时,就应该使用下划线来代替空格。

正则表达式 \w 不会识别 -,但是会识别 _

https://adoyle.me/Today-I-Learned/others/file-naming-with-underscores-and-dashes.html

https://www.linuxidc.com/Linux/2019-06/159017.htm