I have a string in the below format : Please note : \n means linefeed
\n\nThe following table provides the details of intangible assets\nacquired, by major class and weighted average useful life:\n\n \n\n(USS in millions) USEFUL LIFE\nCustomer relationships 15 years $265\nIntellectual property 10 years 120\nTrade names 15 years 51\nFavorable leases 38 years 26\nOther various 2\nTotal intangible assets $464\n\nThe fair value in the opening balance sheet of the 30%\nredeemable noncontrolling interest in Loders was estimated to\nbe $450 million.
I have to extract all the characters between \n\n \n\n and \n\n
Expected output :
(USS in millions) USEFUL LIFE\nCustomer relationships 15 years $265\nIntellectual property 10 years 120\nTrade names 15 years 51\nFavorable leases 38 years 26\nOther various 2\nTotal intangible assets $464
I have written a logic as below :
re.findall(r'(\n\n\s\n\n)(.|\n)*(\n\n)', result)
But above code is not giving me desired result. Can somebody help, please.