Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.8k views
in Technique[技术] by (71.8m points)

提取域名后缀之前的部分

示例字符串

GitHub.com
www.github.com
xxx.github.org
github.com.cn
github.net.cn
www.github.cn
等各种host地址 

提取其中的GitHub部分。
一定是提取其中的GitHub部分啊。
不是匹配。
谢谢大神了。

---------------------------------------
2020.11.25 更新
其中的github不是固定的


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

不必考虑中文域名


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...