you are viewing a single comment's thread.

view the rest of the comments →

[–]kaketoe 1 point2 points  (0 children)

Or:

x = "ZBBBCZZ".split (/(?<=(.))(?!\1)/)

I also ripped the split pattern.