Possible Duplicate:
PHP - Need to remove duplicate characters within a String but would like to include exceptions
I have a string of text below in php.
$string = "@@@@@@ CHECK ME OUT! @@@@@@@@";
or
$string = "//////// CHECK ME OUT! ////////";
The will pretty much will use any character word or key to stand out from the rest when they post. My question is, is there a function or something I can use to prevent people from spamming a key or character.
So if what ever character or key is used more then three times it will remove it. So it will look like this below.
$string = "CHECK ME OUT!";
Thanks