I've experimented with several regular expressions, including the ones below:
1> var pattern = "(.)\\1{2,}";
2> var pattern = "^(?!.*(.)\\1{2,})";
regexExp = new RegExp(pattern);
When I test them, this is the output I receive:
regexExp.test("sss is true")
regexExp.test("ss is false")
regexExp.test("sdsdsd is false") //instead of being true.
My regular expressions only consider consecutively repeated characters and not others.