Ah I had checked that site but did indeed overlook the Go flavour!
Instead of a text string {{ findRE “.+?(#)/gm” .Summary }} now gives me which seems to indicate an empty array instead of the body text up to the first header.
Looks like Github down.
well i dont know the output of your .Summary, but here is the working example regex.
{{ $body := `
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
# Header 1
` }}
{{ findRE `[\S\s]+#` $body }}
Output:
[ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. #]