p \ arrayobj = <<-EOS.scan(/^#(?!#).*(?:\R(?!#(?!#)).*)*/) # Bob's markdown header 1 something here. ## this is markdown header 2 yeah. # kitty's header 1 meow. EOS
Standard input is empty
["# Bob's markdown header 1\n\nsomething here.\n\n## this is markdown header 2\n\nyeah.\n", "# kitty's header 1\n\nmeow.\n\n"]