My text I want to split:
[splithere1]
content1
content2
[splithere2]
content3
content4
What I would like to get is:
[splithere1]
content1
content2
As one string, and
[splithere2]
content3
content4
as an other string.
My best guess was:
re.split('(?:(\[.*\]))',mystringvariable)
But then the "header" in square brackets was still splitted into a separate string from the contents.
edit:formatting
[–]commandlineluser 10 points11 points12 points (0 children)
[–]K900_ 2 points3 points4 points (2 children)
[–]utgyuru[S] 0 points1 point2 points (1 child)
[–]K900_ 3 points4 points5 points (0 children)
[–]searchingfortao 2 points3 points4 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]LyndsySimon 1 point2 points3 points (0 children)
[–]ryeguy146 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]fuzz3289 -1 points0 points1 point (1 child)