正则表达式就像Go中的Perl南瓜一样!
安装
go get github.com/kivilahtio/go-re/v0
用法
查看godoc示例
示例ISO8601解析器
require . "github.com/kivilahtio/go-re/v0"
func init() {
r := Mr(`
kalle: "ankka" - 2021-12-31 23:59:59.0123+0200Z
paavo: "pesus" - 2020-10-31T21:39:39.4321+0230`,
`m/
# this is a comment which encompasses the whole line
^
(?P<username>\w+) # This is a comment too