У меня есть следующий фрагмент уценки:
# Glossary
This guide is aimed to familiarize the users with definitions to relevant DVC
concepts and terminologies which are frequently used.
## Workspace directory
Also abbreviated as workspace, it is the root directory of a project where DVC
is initialized by running `dvc init` command. Therefore, this directory will
contain a `.dvc` directory as well.
## Cache directory
DVC cache is a hidden storage which is found at `.dvc/cache`. This storage is
used to manage different versions of files which are under DVC control. For more
information on cache, please refer to the this
[guide](/doc/commands-reference/config#cache).
Я хочу разбить его так, чтобы были совпадения:
# Glossary
...
## Workspace directory
...
## Cache directory
...
Я пытался сопоставить их с помощью регулярных выражений /#{1,2}\s.+\n{2}[^(#{2}\s)]*/
. Я намеревался сначала сопоставить заголовок с этой частью #{1,2}\s.+\n{2}
, а затем прекратить сопоставление при обнаружении ##\s
. Но у меня не получается со второй частью. Кто-нибудь может направить меня?