I need to look at a string, and find - character that is used more than 1 time
$input = "stack-overflow - 2014 - new" //Contains repeated character - more than 2 times
I found all sorts of really close answers already, but not quite. Is there a PHP regular expression to catch this case? (I have a basic regexp knowledge but this is too much for me)
$regex=' '; //// that what i need
if (preg_match('/(\w)\1{5,}/', $input)) {
# Successful match
} else {
# Match attempt failed
}