I have these two strings :
'''N678 N−12.,13.12.22,18.,19.,31.1.,9.2.,7. au 10.,13. au 17.,20.,21.,22.,28.
au 31.3.,6.,13.,19.,20.4.,5.,8.5.23'''
'''N678 à p. du 11.6.23 C+23.6.23 N−14.,24.7.23'''
i want split it like this: applied on the second string:
['N678 à p. du 11.6.23 ', 'C+23.6.23 ', 'N−14.,24.7.23']
the concept is to : each time you see the format: any_character\s\d{1,2}.\d{1,2}.\d{2,4}\s[A-Z] split it.
I did the last example with this regex : ([A-Za-z].*?\d{1,2}\.\d{1,2}\.\d{2,4}\s*)
but it is not working for the first one, because N678 N-12... will split somewhere around 'au'
`['N678 N−12.,13.12.22', 'au 10.,13. au 17.,20.,21.,22.,28.\nau 31.3.,6.,13.,19.,20.4.,5.,8.5.23']`
it will work fine in the first string if i delete the optional matching question mark, but that will result in incorrect result for the second string.
Any ideas ?