I am using python to scrape some info off IMDb and am looking to replace a given text + 12 characters that follow it with a blank. Is this possible? Here is an example:
I have the string
'<a href="/name/nm2142796/">Santino Rice</a> tells Roxxxy Andrews that she was "like Chewbaca in drag."'
And would like to replace the '<a href="/name/nm2142796/">'
with ''
, but is there a way to do something like:
string.replace('<a href="/name/'+12,'')
it comes up quite a bit, but the nm#######
is always different (it is always 7 digits following the nm though).