An alternative solution since you're allowing code (which your question imply you wouldn't ;)
Using a function like verifyPass below should do the trick. It gradually replaces any valid three letter combination with an empty string. Checking that this is done in more than one iteration (it's at least 6 characters) and ending up with an empty string in the end, means it's a valid password.
function verifyPass(pass) {
var re = /^(.)((?:(?!\1).)*)\1((?:(?!\1).)*)\1((?:(?!\1).)*)$/,
cnt=0;
while(re.test(pass)) {
pass = pass.replace(re, '$2$3$4');
cnt++;
}
return pass==='' && cnt>1;
}
var testItems = [
'123123123',
'AAABBB',
'AAABBBAAA',
'Qwerty',
'ABABBA',
'+++===',
'111',
'qweqwd',
'sdcjhsdfkj',
'+ar++arra',
'mYYYmms',
'/Arrr/AA/'
];
testItems.forEach(function(item) {
document.write('<span style="color:' + (verifyPass(item) ? 'green' : 'red') + ';">' + item + '</span> <br/>');
});