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

replace_str
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: replace_str
quote:
Originally posted by MeEtc
This should work well for you:
http://kevin.vanzonneveld.net/techblog/article/ja..._phps_str_replace/
Although it works, such loop code isn't needed though. JScript already has a (very powerfull) Replace function.

eg:
Debug.Trace("ThA mAn hit thA ball with the bat".replace(/A/g, "e"));
will output: "The men hit the ball with the bat"

As with everything, forum search
CookieRevised's reply to how do i replace this text? > see Part 3
CookieRevised's reply to [Question] Isn't string.replace supposed to replace all occurences ?
CookieRevised's reply to [I help them] VB2JS

PS: yes, you can also use arrays with some small coding (since the Replace function uses regular expressions and actually accepts a function reference as replacement text too). That is done several times already on the forums too (cba to search for it atm).

nevertheless nice code find
;)

This post was edited on 05-07-2008 at 03:36 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-07-2008 02:09 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
replace_str - by Zeelia on 05-06-2008 at 06:36 PM
RE: replace_str - by MeEtc on 05-06-2008 at 08:24 PM
RE: replace_str - by Zeelia on 05-06-2008 at 08:36 PM
RE: replace_str - by roflmao456 on 05-06-2008 at 09:19 PM
RE: replace_str - by Zeelia on 05-06-2008 at 11:01 PM
RE: replace_str - by CookieRevised on 05-07-2008 at 02:09 AM
RE: replace_str - by Zeelia on 05-07-2008 at 11:02 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