fork download
  1. import re
  2.  
  3. s="\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."
  4.  
  5. regex = r"\r?\n\r?\n(.*(?:\r?\n(?!\r?\n).*)*)\r?\n\r?\n"
  6.  
  7. print(re.findall(regex, s))
Success #stdin #stdout 0.02s 9492KB
stdin
Standard input is empty
stdout
['The following table provides the details of intangible assets\nacquired, by major class and weighted average useful life:', '(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']