I have the following test (formatted just like below):
My Class: TEST DATA
Test Section:
Live demo
Note: change the last part as per your need.
sample code:
import re
p = re.compile(ur'Test Section:([\S\s]*)', re.MULTILINE)
test_str = u"..."
re.findall(p, test_str)
Pattern Explanation:
Test Section: 'Test Section:'
( group and capture to \1:
[\S\s]* any character of: non-whitespace (all
but \n, \r, \t, \f, and " "), whitespace
(\n, \r, \t, \f, and " ") (0 or more
times (matching the most amount
possible))
) end of \1
''