I need to split a string without removal of delimiter in Python.
Eg:
content = 'This 1 string is very big 2 i need to split it 3 into paragraph wise. 4 But this string 5 not a formated string.'
content = content.split('\s\d\s')
After this I am getting like this:
This\n
string is very big\n
i need to split it\n
into paragraph wise.\n
But this string\n
not a formated string.
but I want like this way:
This\n
1 string is very big\n
2 i need to split it\n
3 into paragraph wise.\n
4 But this string\n
5 not a formated string