import re
regex = r"^\d +(?:\. \d +)+\. (.*(?:\r ?\n (?!\d +\. ).*)*)"
s = ( "4.71. Firms should determine the frequency and intensity of monitoring on a risk-sensitive basis, \n "
"taking into account the nature, size and complexity of their business and the level of risk to which they are exposed. \n \n "
"4.72. text \n "
"4.9. text\n "
"4.9 addf\n "
"4.73. text\n "
"4.74. text " )
print ( re .findall ( regex, s, re .MULTILINE ) )
aW1wb3J0IHJlCgpyZWdleCA9IHIiXlxkKyg/OlwuXGQrKStcLiAoLiooPzpccj9cbig/IVxkK1wuKS4qKSopIgoKcyA9ICgiNC43MS4gRmlybXMgc2hvdWxkIGRldGVybWluZSB0aGUgZnJlcXVlbmN5IGFuZCBpbnRlbnNpdHkgb2YgbW9uaXRvcmluZyBvbiBhIHJpc2stc2Vuc2l0aXZlIGJhc2lzLCBcbiIKCSJ0YWtpbmcgaW50byBhY2NvdW50IHRoZSBuYXR1cmUsIHNpemUgYW5kIGNvbXBsZXhpdHkgb2YgdGhlaXIgYnVzaW5lc3MgYW5kIHRoZSBsZXZlbCBvZiByaXNrIHRvIHdoaWNoIHRoZXkgYXJlIGV4cG9zZWQuICAgXG5cbiIKCSI0LjcyLiAgdGV4dCBcbiIKCSI0LjkuIHRleHRcbiIKCSI0LjkgYWRkZlxuIgoJIjQuNzMuICB0ZXh0XG4iCgkiNC43NC4gIHRleHQgIikKCQpwcmludChyZS5maW5kYWxsKHJlZ2V4LCBzLCByZS5NVUxUSUxJTkUpKQ==
stdout
['Firms should determine the frequency and intensity of monitoring on a risk-sensitive basis, \ntaking into account the nature, size and complexity of their business and the level of risk to which they are exposed. \n', ' text ', 'text', ' text', ' text ']