I try to match/get all repetitions in a string. This is what I\'ve done so far:
var str = \'abcabc123123\'; var REPEATED_CHARS_REGEX = /(.).*\\1/gi; console
The answer above returns more duplicates than there actually are. The second for loop causes the problem and is unnecessary. Try this:
function stringParse(string){ var arr = string.split(""); for(var i = 0; i