go--正则匹配

import (
    "fmt"
    "regexp"

)

func main() {
    var num = regexp.MustCompile(`/LIVE/`)
    str := "/home/zf/LIVE/asdfa"
    if num.MatchString(str) {
        fmt.Printf("%s", "xxx")
    }
}


猜你喜欢

转载自blog.csdn.net/evsqiezi/article/details/80901060