fork download
  1. import re
  2. text = "1. Notice \nSome text \nEnd Notice\n2. Blabla \nSome other text \nEven more text\n3. Notice \nSome more text\nEnd Notice"
  3. pattern = r"^\d+\. Blabla.*(?:\n(?!\d+\.).*)*"
  4. result = re.findall(pattern, text, re.M)
  5. print(result)
Success #stdin #stdout 0.02s 9428KB
stdin
Standard input is empty
stdout
['2. Blabla \nSome other text \nEven more text']