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:
Montago
Junior Member
**


Posts: 25
Joined: Sep 2006
O.P. Problem with RegExp + Replace
i want to do something really simple - to locate numbers for calculation

function...
    var reg_exp = "([0-9\*\/+\-()]*)";

    if( Messege.match( new RegExp(reg_exp) ) ){
        return Messege.replace(new RegExp(reg_exp,'gi'),"[$1]");
    }

...

Using the function above, should do this :

input : "Havelåge 5+5+5-(5*6) sdsd"
output : "Havelåge [5+5+5-(5*6)] sdsd"

but instead it : "[]H[]a[]v[]e[]l[]å[]g[]e[] [5][]+[5][]+[5][]-[]([5][]*[6][])[] []s[]d[]s[]d[]"


what am i doing wrong ???
09-27-2006 08:28 PM
Profile E-Mail 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