Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // import "bytes"
- // Compile regular expression
- r, _ := regexp.Compile("m([a-z]+)ch")
- in := []byte("much match mech")
- out := r.ReplaceAllFunc(in, bytes.ToUpper)
- fmt.Println(string(out))
- // MUCH MATCH MECH
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement