I'm trying to pull the first paragraph out of Markdown formatted documents: \[quote\] This is the first paragraph. This is the second paragraph. \[/quote\]The answer here gives me a solution that matches the first string ending in a double line break. Perfect, except some of the texts begin with Markdown-style headers: \[quote\] \[code\]###\[/code\] This is an h3 header. This is the first paragraph. \[/quote\]So I need to:
- Skip any line that begins with one or more \[code\]#\[/code\] symbols.
- Match the first string ending in a double line break.