I have a string in php like this.
$str = \"ABCCCDE\" //Contains repeated character CCC more than 2 times
I want to know if there is any repeated characters
You can use:
'/(.)\1\1/'
E.g.:
preg_match('/(.)\1\1/', $str, $matches);