I'm a Go beginner and I've been playing with regexes. Example:
r, _ := regexp.Compile(`\* \* \*`)
r2 := r.ReplaceAll(b, []byte("<hr>"))
(Replace all * * *
s for <hr>
s)
One thing that I have no idea how to do is to find the next
item after an occurence. In JavaScript/jQuery I used to do this:
$("#input-content p:has(br)").next('p').doStuff()
(Find the next p
tag
after a p
tag that has a br
tag inside).
What's the simplest way to accomplish the same in Go? Say, finding the next line after * * *
?
* * * Match this line