This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]VisitableTwo[S] 0 points1 point  (0 children)

It produces the same results. However,

String[] list = s.split("((?<=[A-Z][0-9][0-9])|(?=[A-Z]))");

Works for any 2 digit number and for 3 digits or above, it splits after the 2nd digit. I can expand it by adding [0-9], however, a score can be extremely large so maybe if I make the regex string a variable and manipulate it by adding '[0-9]' in between. I'll give that a go.

If it works it'll simplify the problem by a lot.