我在Obsidian_to_Anki插件中使用Obsidian(使用ECMASRIPT),我有这样的页面 struct :
# Heading 1 ⤵
## Heading 1.1
Text of Heading 1.1
Text can span over multiple lines
Even more text
## Heading 1.2
Text of Heading 1.2
# Heading 2
## Heading 2.1
Text of Heading 2.1
## Heading 2.2
Text of Heading 2.2
# Heading 3 ⤵
## Heading 3.1
Text of Heading 3.1
## Heading 3.2
Text of Heading 3.2
# Heading 4
我需要一个匹配嵌套在# Heading ⤵
下的所有## Headings
和Text of Headings
的RegExp.⤵
在这里应该起到某种switch 的作用.所有## Headings
和Text of headings
都应与捕获组匹配.因此,不应该匹配嵌套在# Heading
下而没有⤵
的内容.因此,匹配的文本应为:
## Heading 1.1
Text of Heading 1.1
More text
Even more text
## Heading 1.2
Text of Heading 1.2
## Heading 3.1
Text of Heading 3.1
## Heading 3.2
Text of Heading 3.2
Here's what I came up with regex## headings and texts
.我的问题是,这种方式只有前## headings and texts
个匹配,而我找不到解决方案.