mirror of
https://gitee.com/johng/gf
synced 2026-07-08 14:39:50 +08:00
14 lines
261 B
Go
14 lines
261 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"gitee.com/johng/gf/g/util/gregx"
|
|
)
|
|
|
|
func main() {
|
|
a , e := gregx.MatchString(`(.+):(\d+),{0,1}(\d*),{0,1}(.*)`, "127.0.0.1:12333")
|
|
fmt.Println(e)
|
|
for k, v := range a {
|
|
fmt.Printf("%d:%v\n", k, v)
|
|
}
|
|
} |