I have a file formatted like this:
03.12.2020 ++++baz;bar;++bik;
04.12.2020 +++bar;
05.12.2020 ++++baz;bar;bur,jojo;+++bik;buch;+pac;
It follows the format:
date, tab, "++++", list of keywords with magnitude 4 with ";"after each keyword, "+++" list of keywords with magnitude 3 with ";"after each keyword etc.
It the specific magnitude does not exist the section is omitted for example (+++keyword_with_magnitude_3;+keyword_with_magnitude_1;another_keyword_with_magnitude_1;)
I need to convert it to: date, keyword; magnitude
For example from:
03.12.2020 ++++baz;bar;++bik;
to
03.12.2020, baz, 4
03.12.2020, bar, 4
03.12.2020, bik, 2
Regex ^(\d\d\.\d\d\.\d\d\d\d\t)\+\+\+\+([^\+\r]+) finds only the lines with "four's and nothing else
EDIT1: I could drop it into NodeJS if it is easier. I don't know how to split the lines while keeping the date as a first thing in each lane.