I am trying to split a string by a single or multiple occurrence of letters.
For example:
aaabbcapppp
, would yield the array, ["aaa", "bb", "c", "a", "pppp"]
The most-Inefficient idea I had was to just utilize, newArray = str.split("");
and rebuild the array to my needs. I assume there is a much more efficient solution.