I created regex for matching such pattern:
<some text>
yyyy.MM.dd SOME TEXT decimal decimal
yyy.MM.dd
some sentence
some sentence
some sentence (it can have from 1 to n lines of comments) but the last line that does not start with yyyy.MM.dd SOME TEXT decimal decimal)
yyyy.MM.dd SOME TEXT decimal decimal
yyy.MM.dd
some sentence
some sentence
some sentence
...
<some text>
The regex:
((\d{4}\.\d{2}\.\d{2})\s([a-zA-Z\s]{0,})\s(\-{0,1}((\d{1}\,\d{2})|(\d{1,}\ \d{3}\,\d{2})))\s(\-{0,1}((\d{1}\,\d{2})|(\d{1,}\ \d{3}\,\d{2}))\s)(\d{4}\.\d{2}\.\d{2}))
Which matches only first 2 lines. I can't match multiline sentences until next yyyy.MM.dd SOME TEXT decimal decimal
(exclusively)
This is the test data for matching:
2020.11.01 SOME TEXT -17,30 83 016,86
2020.10.30
Some text that should be
matched 20.01.2020 as
multiline text
until now
2020.11.01 SOME TEXT -27,30 81 016,86
2020.10.30
Some text that should be
matched 20.01.2020 as
multiline text
until now
...
it should match like this:
1.
2020.11.01 SOME TEXT -17,30 83 016,86
2020.10.30
Some text that should be
matched 20.01.2020 as
multiline text
until now
2020.11.01 SOME TEXT -27,30 81 016,86
2020.10.30
Some text that should be
matched 20.01.2020 as
multiline text
until now
For me it matches like this:
1.
2020.11.01 SOME TEXT -17,30 83 016,86
2020.10.30
2020.11.01 SOME TEXT -27,30 81 016,86
2020.10.30
How can I match from 1 to many multiline lines WITHOUT 'yyyy.MM.dd SOME TEXT decimal decimal' on the next line?