I am making a small little project that should extract song and artist names from youtube videos. Currently I have the video description that has the following structure
Text text text
Tracklist:
[00:00] Sobs - Girl
[02:25] Mopac - Cross-Eyed Dreaming
[05:54] L I P S - In Summer
[09:18] Small Wood House - T.V
Text text text
I want to be able to extract the Artist name and Song name from this string. I am trying to use Regex to do this and the regex I have right now matches the timecode and any text before a newline.
'((.*([0-9]?[0-9]:)?[0-5][0-9]:[0-5][0-9]).*\n)+'
Now I need to find a way to match any text before the timecodes but not include them in the final string and also do this for the timecode. I tried to use capturing groups but it was unsuccessful.
The result I want should look like this
Sobs - Girl
Mopac - Cross-Eyed Dreaming
L I P S - In Summer
Small Wood House - T.V