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

Replacing "?"
Author: Message:
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: RE: Replacing "?"
quote:
Originally posted by CookieRevised
? What?!?

will turn into:

..? What..?!..?

with that reg expression.... Maybe something to take into account that the question mark must be proceeded with text and at least 1 space should be after it before it is replaced?
No it won't. I assume you're talking about this one:

code:
stringObj.replace(/\?$/, "..?");

Because it is not global, only one occurrence will be replaced, and since there is the $ at the end of it, only the last one. "? What?!?" turns into "? What?!..?".
05-03-2007 10:57 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Replacing "?" - by Jimbo on 05-03-2007 at 04:43 PM
RE: Replacing "?" - by Ezra on 05-03-2007 at 05:01 PM
RE: Replacing "?" - by Jimbo on 05-03-2007 at 06:01 PM
RE: Replacing "?" - by Matti on 05-03-2007 at 06:28 PM
RE: Replacing "?" - by Ezra on 05-03-2007 at 07:02 PM
RE: Replacing "?" - by CookieRevised on 05-03-2007 at 10:50 PM
RE: RE: Replacing "?" - by deAd on 05-03-2007 at 10:57 PM
RE: Replacing "?" - by CookieRevised on 05-03-2007 at 11:01 PM
RE: Replacing "?" - by Matti on 05-04-2007 at 04:40 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