I am trying to create a regex that matches a string if it has a 3 or more repetitive characters in a row (e.g. aaaaaa, testtttttt, otttttter).
I have tried the following:
regexp.Compile("[A-Za-z0-9]{3,}")
regexp.Compile("(.){3,}")
regexp.Compile("(.)\\1{3,}")
which matches any 3 characters in a row, but not consecutive characters... Where am I going wrong?