import retest_str = "[1]first[2]second[3]third"print( re.split(r'(?!^)(?=\[\d+\])', test_str) )
Standard input is empty
['[1]first', '[2]second', '[3]third']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!