I want to extract myinformation_1
and myinformation_2
from the list below.
My code is not working yet.
Can you please help?
Thank you,HHC
import re
start = re.escape(">")
end = re.escape("<")
stringlist =['<div class="ant-space-item"><a href="/holdings-of-1">myinformation_1</a></div>',
'<div class="ant-space-item"><a href="/holdings-of-2avbf">myinformation_2</a></div>']
for i in stringlist :
result = re.search('%s(.*)%s' % (start, end), i).group(1)
print(result)