The answer becomes obvious as soon as you start thinking about what exactly defines a “paragraph” in your world.
If this is the first list of characters following two newlines? Sort of
str.split("\n\n", 2)[0]
can work.
HTML, <p>, nokogiri
Nokogiri::HTML.parse(input_string).css('p').first.text
, . , , , .. . , .