I have a string 1122333344555566778888
I need to substring it and as a result get [11, 22, 3333, 44, 5555, 66, 77, 8888]
Is it possible to do it in a beautiful way or I need to hardcode it and eight time use string.substring(beginning, ending) function and then put into array?
Edit: String can contain not only repeated numbers. AB CG HERD KJ 98HQ 0K 1E OOQW it also example!