Split text based on character, but keep 'splitting character'

Hi!

Sorry for my late reply, I think this is possibly the solution I am looking for.
Unfortunately I am not an Python expert.

Would it be possible to write it in an GH - Python component, with 2 input variabels:
x = input text which has to be ‘split’
y = all ‘splitting’ characters at which the text has to be split?

so just like the component below, with the difference that the 'splitting characters should still be present?

Many thanks!
2023-01-28 Split text at chacter ánd keep charcarter.gh (5.9 KB)


[2023-01-28 Split text at chacter ánd keep charcarter.gh|attachment]