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