Hi,
I have a script in a chatroom that is similar to smilies. By pressing a button it automatically prefills the text box with a word that is replaced with an image.
The problem is the use of this button is seriously abused and so the chatroom gets filled with the same image over and over.
One of the words is RELOAD
so the text may contain RELOAD RELOAD RELOAD which would be replaced with 3 instances of the reload image.
What i want is some sort of replace statement that will only allow 1 instance of the image in the sentence.
I could probably do it using lots of lines of code but before I try i thought i would ask if there is a function that will help me achieve this simply.
Thanks in advance!