What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] "Dynamic" RegExp replace...

[?] "Dynamic" RegExp replace...
Author: Message:
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [?] "Dynamic" RegExp replace...
Don't think you can do it in one replace call, you can always just loop through them:
js code:
for(var key in some_variables)
    input = input.replace(new RegExp("%var:"+key+"%", "gi"), some_variables[key]);
08-16-2011 06:19 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] "Dynamic" RegExp replace... - by whiz on 08-16-2011 at 05:57 PM
RE: [?] "Dynamic" RegExp replace... - by Eljay on 08-16-2011 at 06:19 PM
RE: [?] "Dynamic" RegExp replace... - by whiz on 08-16-2011 at 06:54 PM
RE: [?] "Dynamic" RegExp replace... - by Matti on 08-17-2011 at 02:22 PM
RE: [?] "Dynamic" RegExp replace... - by whiz on 08-17-2011 at 06:20 PM


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