Go语言:正则表达式的使用
Go语言的正则表达式使用很简单,示例代码: package test import ( "fmt" "regexp" ) func RegixBase() { //findTest() //findIndexTest() //findStringTest() //findChinesString() //findNumOrLowerLetter() findAndReplace() } //传入[]byte,返回[]byte func findTest() { str := "ab001234hah120210a880218end" reg := regexp.MustCompile("\\d{6}") //六位连续的数字 fmt.Println("------Find------") //...阅读全文