Regex Find and group text blocks

I am trying to extract coherent text blocks (from a markdown) as i need to replace them.

Example:

some other text.....
some other text.....

> **_NOTE:_** \
> multi line note text ....\
> note text ....\
> note text ....

## section

Lorem ipsum....

> **_NOTE:_** \
> note text

Lorem ipsum....

> **_NOTE:_** single line note text

I am looking for a regular expression that detects blocks starting with > **_NOTE:_*, followed by all lines starting with > and resulting in 3 groups for this example:

Group 1:

> **_NOTE:_** \
> multi line note text ....\
> note text ....\
> note text ....

Group 2:

> **_NOTE:_** \
> note text

Group 3:

> **_NOTE:_** single line note text

Read more here: Source link