When parsing this string:
import re
s = 'hello how are you? {{foo;;[[1;;2;;3]];;bar;;[[0;;2;;3]]}} im okay {{ABC;;DEF;;[[10;;11]]}}'
for m in re.findall(r'{{(.*?)}}', s):
print('curly brackets: ', m)
L = m.split(';;')
print(L)
The m.split(';;')
should give this:
['foo', '[[1;;2;;3]]', 'bar', '[[0;;2;;3]]']
instead of:
['foo', '[[1', '2', '3]]', 'bar', '[[0', '2', '3]]']
How to modify the split to do this?