I need to remove the year from a copyright. The copyright can be in the following forms:
2011 Company --> 'Company'
Company 2011 --> 'Company'
2011 1 Company 2 --> '1 Company 2'
1 Company 2 1944 --> '1 Company 2'
How would I remove the 4-digit copyright and get the company only (note that the company may include numbers in its name).
So far I’ve tried [0-9]{4}, but have had trouble forming it into a re search.
>>> a=re.search('[0-9]{4}',a)
>>> a
<_sre.SRE_Match object at 0x10527b780>
>>> a.match(0)
>>> AttributeError: match
Try this