regex to split string into num and char golang
package main
import (
"fmt"
//"strings"
"regexp"
)
func main() {
s := "xyzxyzxyzxyzxyz"
t := regexp.MustCompile(`[y]`) // backticks are used here to contain the expression
v := t.Split(s, -1) // second arg -1 means no limits for the number of substrings
fmt.Println(v) // [x zx zx zx zx z]
}