我在golang中有这个简单的代码:
rHref, _ := regexp.Compile(`href=[\'"]?([^\'" >]+)`)
rHttp, _ := regexp.Compile(`http[s]?://(?:[a-zA-Z]|[0-9]|[$\-_@.&+/?=]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+`)
foundHREF := rHref.FindAllString(input, -1)
foundTEXT := rHttp.FindAllString(input, -1)
foundURLs := foundHREF + foundTEXT
return foundURLs
我需要连接2个列表(foundHREF + foundTEXT)并返回输出, 我怎么能在golang做到这一点?