package mainimport ("fmt" "regexp")const text = `My email is 8899666@qq.comemail1 is abc@def.orgemail2 is kkk@qq.comemail3 is ddd@abc.com.cn`func main() {//确定要寻找的目标及返回需要的字符段 ...
package main import ( "bytes" "encoding/json" "io" "io/ioutil" "net/http" "time" ) // 发送GET请求 // url: 请...
package main import ( "log" "net/http" //http 请求用 "io" // io.Copy获取http请求状态用;HttpPost "os" // os.Stdout 取io.Copy 返回数据中的status;Http...
package main import ( "bufio" "fmt" "io" "os" ) func readtxt(filename string){ file,err:=os.Open(filename) if err!=nil { ...
package main import b64 "encoding/base64" import "fmt" func main() { data := "abc123!?$*&()'-=@~" sEnc := b64.StdEncoding.EncodeToString([]byte(data)) fm...
package main import ( "fmt" "io/ioutil" "net/http" "time" ) func main() { client := &http.Client{ Timeout: 2 * time.Second,...
package main import ( "fmt" "syscall" "unicode/utf16" "unsafe" ) var( kernel=syscall.MustLoadDLL("kernel32.dll") getModu...
package main import ( "net/http" "net/url" "fmt" "io/ioutil" ) func main() { //?mod=forumdisplay&fid=42 params:=url.Values{ ...
package main import ( "fmt" ) func main() { str := "Hello,世界" //方法一:格式化打印 for _, ch1 := range str { fmt.Printf("%q",ch1) //单引号围绕的字符字面值,由go语法安...
package main import ( "fmt" "regexp" ) func main(){ r,_:=regexp.Compile("aaa(.*?)bbb") matches:=r.FindAllString("42342342aaa111111111111bbbasd...