从纯文本提取 URL xurls

码农软件 · 软件分类 · 常用工具包 · 2019-08-17 13:42:04

软件介绍

xurls 可以从纯文本中使用正则表达式提取 URL。

go get github.com/mvdan/xurls

使用示例

import "github.com/mvdan/xurls"
func main() {
    xurls.Relaxed.FindString("Do gophers live in golang.org?")
    // "golang.org"
    xurls.Relaxed.FindAllString("foo.com is http://foo.com/.", -1)
    // []string{"foo.com", "http://foo.com/"}
    xurls.Strict.FindAllString("foo.com is http://foo.com/.", -1)
    // []string{"http://foo.com/"}
}


本文地址:https://codercto.com/soft/d/12563.html

Linked

Linked

Albert-Laszlo Barabasi / Plume / 2003-4-29 / GBP 11.24

A cocktail party. A terrorist cell. Ancient bacteria. An international conglomerate. All are networks, and all are a part of a surprising scientific revolution. Albert-L&aacuteszló Barab&a......一起来看看 《Linked》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具