Shoutbox

[help please] replace function! - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [help please] replace function! (/showthread.php?tid=66435)

[help please] replace function! by skyserpent on 09-19-2006 at 03:04 PM

hello people of the world :)

ive got this:

code:
            Message = Message.replace(/a/gi,"α");
            Message = Message.replace(/b/gi,"в");
            Message = Message.replace(/c/gi,"¢");
            Message = Message.replace(/d/gi,"∂");
            Message = Message.replace(/e/gi,"є");
            Message = Message.replace(/f/gi,"ƒ");
            Message = Message.replace(/h/gi,"н");
            Message = Message.replace(/i/gi,"ι");
            Message = Message.replace(/j/gi,"נ");
            Message = Message.replace(/k/gi,"к");
            Message = Message.replace(/l/gi,"ℓ");
            Message = Message.replace(/m/gi,"м");
            Message = Message.replace(/n/gi,"η");
            Message = Message.replace(/o/gi,"σ");
            Message = Message.replace(/p/gi,"ρ");
            Message = Message.replace(/r/gi,"я");
            Message = Message.replace(/t/gi,"т");
            Message = Message.replace(/u/gi,"υ");
            Message = Message.replace(/v/gi,"ν");
            Message = Message.replace(/w/gi,"ω");
            Message = Message.replace(/x/gi,"χ");
            Message = Message.replace(/y/gi,"у");
            return Message;

i want it so if a shortcut for an emoticon is sent then it doesnt replace it. it also needs to not replace it if the text that is sent is a shortcut to a custom emotion