tests:
output:
I want list of only artists name. so, far i have came up with r'Artist:\s*(.*)(?:;|$)' this regex but it only works with single artists(case 2 and 3). can somebody suggest general solution for all. I am trying to extract details between : and ;(if present).
In [10]: reg_str = 'Artist: Tsujimura Shirō xyz abc'In [11]: re.findall(r’Artist:\s*(.*)(?:;|$)', reg_str)
Out[11]: [‘Tsujimura Shirō xyz abc’]
#python #regex