Regex 如何使用grep从段落中提取句子

Regex 如何使用grep从段落中提取句子,regex,grep,Regex,Grep,假设我有多段文字,开头和结尾都是“开始”和“结束” 例如: START i am just and example of a multiline paragraph having some unique informations in each para. I end with a capital END. START i am just and example of a multiline paragraph having some unique informations in each p

假设我有多段文字,开头和结尾都是“开始”和“结束”

例如:

START i am just and example of a multiline paragraph having some unique informations in each para. I end with a capital END.

START i am just and example of a multiline paragraph having some unique informations in each para. You see in this paragraph I have one extra line.I end with a capital END.
如何使用grep从每个段落的单词START和END中提取内容并存储在数组中


提前感谢您的帮助

希望您能从中获得一些想法:


模式:?您的单行示例输入文本表示这是一个多行段落的示例。请澄清每个段落是否在一行或包含换行符,并在必要时更新您的示例输入/输出以匹配。还有-开头和/或结尾可以出现在段落中间吗?@Ed Morton如果你无法回答问题,请不要留下不必要的评论。请看下面的解决方案。谢谢Abimanyu,这很有帮助。这与我一直在寻找的解决方案非常接近:
**Match 1**
1.  i am just and example of a multiline paragraph having some unique informations in each para. I end with a capital
**Match 2**
1.  i am just and example of a multiline paragraph having some unique informations in each para. You see in this paragraph I have one extra line.I end with a capital