daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Feb 17th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package main
  2.  
  3. import (
  4.    "fmt"
  5.    "regexp"
  6. )
  7.  
  8. func main() {
  9.    s := `"Abraham Lincoln" @en`
  10.    reg := regexp.MustCompile(`"([^"]*)" *@en`)
  11.    res := reg.ReplaceAllString(s, "${1}")
  12.    fmt.Println(res) // Abraham Lincoln
  13. }
  14.    
  15. reg := regexp.MustCompile(`"([^"]*)".*@en`)
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