I want to now how do i split a string like
44664212666666 into [44664212 , 666666] or
58834888888888 into [58834, 888888888]
without knowing where the first occurrence of the last recurring digit occurs.
so passing it to a function say seperate(str) –> [non_recurring_part, end_recurring digits]
I want to now how do i split a string like 44664212666666 into [44664212
Share
As pointed out in the comments, the last group should be made optional to handle strings with no repeated symbols correctly: