What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Replace() Help

Replace() Help
Author: Message:
Silentdragon
Full Member
***

Avatar
if(life==null && wrists) EmoAlert();

Posts: 148
Reputation: 2
34 / Male / –
Joined: Jun 2006
RE: Replace() Help
it creates a RegExp object for the replace function
although a better way would be to do this in the for loop
var RegEx = new RegExp(myCode[i][0],"g");
tmpMessage = tmpMessage.replace(RegEx,myCode[i][1]);

so you don't need to make a new RegExp object for each array value.
08-19-2006 12:44 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Replace() Help - by Spunky on 08-19-2006 at 12:17 AM
RE: Replace() Help - by Silentdragon on 08-19-2006 at 12:36 AM
RE: Replace() Help - by Spunky on 08-19-2006 at 12:38 AM
RE: Replace() Help - by Silentdragon on 08-19-2006 at 12:44 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On