Good Night,
Somebody knows how to get multi-values using regexp.
For example, i have a string containing several lines, and i want to get all values that started with “
Your post does not include any input data. Please check your usage of markup, maybe your data is just not visible to us because you’ve formated your question badly.
Why don’t you just parse the html and look for the tags? A slightly modified version of an example in the html package docs could suffice:
doc, err := html.Parse(r)
if err != nil {
// ...
}
var f func(*html.Node)
f = func(n *html.Node) {
if n.Type == html.ElementNode && n.Data == "td" {
//Now do something with the inner text, like print it.
fmt.Printf("<td> content is: %s\n", n.FirstChild.Data)
}
for c := n.FirstChild; c != nil; c = c.NextSibling {
f(c)
}
}
f(doc)