Using JavaScript, I need to check if a given string contains a sequence of repeated letters, like this:
\"aaaaa\"
How can I do t
This will check if the string has repeats more than twice:
function checkStr(str) { str = str.replace(/\s+/g,"_"); return /(\S)(\1{2,})/g.test(str); }