从纯文本提取 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

Programming Python

Programming Python

Mark Lutz / O'Reilly Media / 2006-8-30 / USD 59.99

Already the industry standard for Python users, "Programming Python" from O'Reilly just got even better. This third edition has been updated to reflect current best practices and the abundance of chan......一起来看看 《Programming Python》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具