Hello I need help with Regular Expression,
I want to match each section (number and it's text - 2 groups), the text can be multi line, each section ends when another section starts (another number) or when .END is reached or EOF.
Demo
Expression:
\(\d{1,3}\) ([\s\S]*?)(\.END|\(\d{1,3}\))
Input text:
(1) some text some text
some text some text
some text some text
(2) some text some textsome text
(3) some textsome text
some textsome textsome text
(4) some text
.END
first group should match number (with brackets) and second group should match corresponded text.