I have a text file with multiple lines, punctuation, and other word boundaries.
Example:
TITLE: Praying SINGER: Kesha
[Music video spoken intro:]
"Am I dead? Or is this one of those dreams? Those horrible dreams that seem
like they last forever? If I am alive, why? Why? If there is a God or
whatever, something, somewhere, why have I been abandoned by everyone and
everything I've ever known?
I've ever loved? Stranded. What is the lesson?
What is the point?
TITLE: Don't Stop the Party SINGER: Pitbull
I say, y'all having a good time, I'll bet
Yeah, yeah, yeah
Que no pare la fiesta
Don't stop the party
Yeah, yeah, yeah
Que no pare la fiesta
Don't stop the party
The goal is to pull the lyrics of the song without including the title or singer. There are at least 10 of these in my file so it will need to pull all 10 using regex.
content = re.findall(r'TITLE\:\s\w+(.*)?\s*SINGER', file, re.DOTALL)