I am working on text files like this:
Chapter 01
Lorem ipsum
dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
Chapter 02
consectetur adipiscing
sed do eiusmod tempor
Chapter 03
et dolore magna aliqua.
with delimiters like "chapter", "Chapter", "CHAPTER", etc... and 1 or 2 digits ("Chapter 1" or "Chapter 01").
I managed to open and read the file in Python, with .open() and .read()
mytext = myfile.read()
Now I need to split my string, in order to get text for "Chapter XX".
For Chapter 02, that would be :
consectetur adipiscing
sed do eiusmod tempor
I'm new to Python, I read about regex, match, map, or split, but... well...
(I'm writing a Gimp Python-fu plugin, so I use Python version bundled in Gimp, which is 2.7.15).