正则表达式多行字符串到字符串

Regex multiline string to string

正在尝试匹配正则表达式...以下格式:

1. random string
...random lines of strings
Related Entities

因此尝试从“1”开始。到字符串 "Related Entities" 中间有可变数量的行。

在这里尝试另一个...

Biography...
...random lines of strings
\n\n\n

尝试从字符串 "Biography" select 直到找到 3 个空行。在两个目标字符串之间也有一些不同数量的任何字符的行数。

谢谢

抱歉,我试过了:

(\b1.).(\n.)(\sR)

(\b1.).(\n.){3} <-- 虽然不知道如何制作可变数量

对于您的第一个查询,您可以使用:

^1\.(?:.*\n)+Related Entities

第二个:

^Biography(?:.*\n)+(?:\n){3}