What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Problem with RegExp + Replace

Problem with RegExp + Replace
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Problem with RegExp + Replace
quote:
Originally posted by Montago
Next - how do i EVAL the piece ??
like exactly like you just said: use the Eval() function in the replace.

quote:
Originally posted by Montago
and i recall that the function would only process one math piece ?
the replace can replace all occuring findstrings.

Search the forum for "calc", there are already a few threads about calculating  expressions. So to avoid repeating everything which has been said already in other threads, search forums first and you'll find similar threads..

- calculating with eval(). eg:
CookieRevised's reply to An idea for a script

- one which explanes how the Replace method actually works (instead of "$1" as replacement string, you can use a function as a replacement string. This is what makes Replace so powerfull and which makes it possible to use Eval for example directly in your replace method. eg:
CookieRevised's reply to [Question] Isn't string.replace supposed to replace all occurences ?
(^^ explains the replace function)
CookieRevised's reply to Replace Colour Codes
(^^ shows an example for replace using a function as replace text)
CookieRevised's reply to [I help them] VB2JS
(^^ shows an example for replace using a function as replace text)

- one which uses a complex algorithm instead of eval() to calculate almost all possible expressions (eval() is rather limited). eg:
[?] Pow... err, triggering some function on certain convo events?

- etc...

This post was edited on 09-29-2006 at 12:39 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
09-29-2006 12:25 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Problem with RegExp + Replace - by Montago on 09-27-2006 at 08:28 PM
RE: Problem with RegExp + Replace - by deAd on 09-27-2006 at 08:57 PM
RE: Problem with RegExp + Replace - by Silentdragon on 09-27-2006 at 09:24 PM
RE: Problem with RegExp + Replace - by deAd on 09-27-2006 at 09:47 PM
RE: Problem with RegExp + Replace - by Montago on 09-27-2006 at 10:45 PM
RE: Problem with RegExp + Replace - by deAd on 09-27-2006 at 10:49 PM
RE: Problem with RegExp + Replace - by Montago on 09-27-2006 at 10:54 PM
RE: Problem with RegExp + Replace - by deAd on 09-27-2006 at 11:03 PM
RE: Problem with RegExp + Replace - by Montago on 09-27-2006 at 11:09 PM
RE: Problem with RegExp + Replace - by deAd on 09-27-2006 at 11:54 PM
RE: Problem with RegExp + Replace - by Shondoit on 09-28-2006 at 04:57 AM
RE: Problem with RegExp + Replace - by Montago on 09-28-2006 at 11:14 AM
RE: Problem with RegExp + Replace - by CookieRevised on 09-29-2006 at 12:25 AM
RE: Problem with RegExp + Replace - by deAd on 09-29-2006 at 12:34 AM
RE: Problem with RegExp + Replace - by CookieRevised on 09-29-2006 at 12:41 AM
RE: Problem with RegExp + Replace - by deAd on 09-29-2006 at 12:43 AM
RE: Problem with RegExp + Replace - by CookieRevised on 09-29-2006 at 12:51 AM
RE: Problem with RegExp + Replace - by Montago on 09-29-2006 at 09:33 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