首次提交:初始化项目代码

This commit is contained in:
sunct
2026-07-31 15:18:32 +08:00
commit d6393266b0
193 changed files with 14287 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
package main
import (
"fmt"
"regexp"
)
// 匹配 http/https 协议链接,不单独捕获协议字段
var urlRegex = regexp.MustCompile(`(?:http|https)://\w+\.\w+\.\w+`)
func main() {
text := "站点:https://www.miaoall.cn 镜像:http://www.miaoall.cn"
res := urlRegex.FindAllString(text, -1)
fmt.Println("匹配链接:", res)
}