Har denna kod:
<%
Function Free(txt)
txt = Replace(txt, ":)", "<img src=""smileys/smile.gif"">")
txt = Replace(txt, ":(", "<img src=""smileys/frown.gif"">")
txt = Replace(txt, ":r", "<img src=""smileys/shame.gif"">")
txt = Replace(txt, ":D", "<img src=""smileys/biggrin.gif"">")
txt = Replace(txt, ";)", "<img src=""smileys/wink.gif"">")
txt = Replace(txt, ":P", "<img src=""smileys/tongue.gif"">")
txt = Replace(txt, ":h", "<img src=""smileys/cool.gif"">")
txt = Replace(txt, ":@", "<img src=""smileys/angry.gif"">")
txt = Replace(txt, ":o", "<img src=""smileys/oh.gif"">")
txt = Replace(txt, ":q", "<img src=""smileys/quest.gif"">")
txt = Replace(txt, ":birp", "<img src=""smileys/beergrin.gif"">")
txt = Replace(txt, ":bire", "<img src=""smileys/bire.gif"">")
txt = Replace(txt, "=P", "<img src=""smileys/blah.gif"">")
txt = Replace(txt, ":x", "<img src=""smileys/dead.gif"">")
txt = Replace(txt, ":s", "<img src=""smileys/devil.gif"">")
txt = Replace(txt, ":bak", "<img src=""smileys/devilgrin.gif"">")
txt = Replace(txt, ":f", "<img src=""smileys/flirt.gif"">")
txt = Replace(txt, ":/", "<img src=""smileys/hrmpf.gif"">")
txt = Replace(txt, ":i", "<img src=""smileys/idea.gif"">")
txt = Replace(txt, ":stud", "<img src=""smileys/stud.gif"">")
free = txt
end function
text = ":):(:r:D;):P:h:@:o:q:birp:bire=P:x:s:bak:f:/:i:stud"
response.write free(text)
%>
När jag kör koden blir det så här:
http://www.ampy.net/smiles.gif
Den sista smileyn (:stud) kommer inte med. Jag tror det beror på att det finns en annan smiley som har beteckningen :s och denna och den sista börjar på samma två första tecken: :s
Vad kan man göra åt detta?