I want to split a string on a character when it's in the middle of the string
Example :
string_1 = '-1232-1412'
string_2 = '1234-1243'
I want to have this :
output_string_1 = ['-1232','1412']
output_string_2 = ['1234','1243']
I tried this :
import re
In[1]: re.split(r'\w-',string_1)
Out[1]: ['-123', '1412']
but it deleted the last character before '-'
(?!^)-(?!$)regex101.com/r/Ppp5Qg/1