I\'m stuck with the following problem:
I need to find repeated characters in a string.
Basically what I want is regular expression that will match like that
var obj = {};
var str = "this is my string";
for (var i = 97; i < 97 + 26; i++)
obj[String.fromCharCode(i)] = 0;
for (var i = 0; i < str.length; i++) {
obj[str.charAt(i).toLowerCase()]++;
}
From there you can say obj["a"] to get the number of occurrences for any particular letter.