a guest Mar 21st, 2019 58 Never
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)
- // MUCH MATCH MECH
RAW Paste Data