mirror of
https://gitee.com/johng/gf.git
synced 2024-12-03 04:37:49 +08:00
14 lines
300 B
Go
14 lines
300 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"gitee.com/johng/gf/g/util/gregx"
|
|
)
|
|
|
|
func main() {
|
|
a , e := gregx.MatchString(`<\?xml.*encoding\s*=\s*['|"](.*?)['|"].*\?>`, `<?xml version= '1.0' encoding = "utf-8" ?>`)
|
|
fmt.Println(e)
|
|
for k, v := range a {
|
|
fmt.Printf("%d:%v\n", k, v)
|
|
}
|
|
} |