import( "bufio" "bytes" "fmt" "io/IoUtil" "net/http" "os" "regexp" "strconv" "strings" ) funcListHref(htmlstring){ varhrefRegexp=regexp.MustCompile("(?m)<a.*?[^<]>.*?</a>") match:=hrefRegexp.FindAllString(html,-1) ifmatch!=nil{ fori,v:=rangematch{ fmt.Println("[",i,"]-",v) } } }