$msg = eregi_replace("\.\.fish", "<img src=\"\./emoticons/fish.gif\" alt=\"Emoticon\" border=0>",$msg);
$msg = eregi_replace("\.\.fishing", "<img src=\"\./emoticons/fishing.gif\" alt=\"Emoticon\" border=0>",$msg);
$msg = eregi_replace("\.\.fly", "<img src=\"\./emoticons/fly.gif\" alt=\"Emoticon\" border=0>",$msg);
$msg = eregi_replace("\.\.flying", "<img src=\"\./emoticons/flying.gif\" alt=\"Emoticon\" border=0>",$msg);
It works great except for one issue... if I type the smiley code for fishing "..fishing" I get the fish smiley followed by "ing". The replace is handling fish and ignoring fishing.
Yes, I could just rename my smileys, however... all my smileys (over 100) come from my chat room. The code is always two periods followed by the name (..fishing ..smiley ..rofl etc.). Everyone knows the codes and to now change the 20 or so that conflict would be a pain for the users. We all know how users hate change.
Can someone recommend what I might do to get both ..fish and ..fishing, and ..fly and ..flying, etc... to work?