daily pastebin goal
89%
SHARE
TWEET

Untitled

a guest Mar 21st, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // import "bytes"
  2. // Compile regular expression
  3. r, _ := regexp.Compile("m([a-z]+)ch")
  4. in := []byte("much match mech")  
  5. out := r.ReplaceAllFunc(in, bytes.ToUpper)  
  6. fmt.Println(string(out))
  7. // MUCH MATCH MECH
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top