Ive a working regex pattern:
^\s+$\n^([ \t]+)Summary.*(?:\n\1[ \t]*\S.*)+
Designed to match an entire paragraph that starts with the word "Summary", as per this question.
I am now seeking to have this work with gawk, e.g.
gawk '/^\s+$\n^([ \t]+)Summary.*(?:\n\1[ \t]*\S.*)+/{print}'
But the above statement is returning nothing.
As an alternative I can use
gawk /Summary/ myfile.txt
Which returns a single line of the paragraph that contains the word 'Summary'. Presumably I can use the RS variable to specify the record separator.