What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help]Returning the inside of a string...

[Help]Returning the inside of a string...
Author: Message:
Silentdragon
Full Member
***

Avatar
if(life==null && wrists) EmoAlert();

Posts: 148
Reputation: 2
34 / Male / –
Joined: Jun 2006
RE: [Help]Returning the inside of a string...
It doesn't work for you because the way you wrote the RegExp. It will return an array of matches.

Your code should be like this
code:
var text = Message.match(/((\[b\](.*?)\[\/b\](.*?))|(\[u\](.*?)\[\/u\]))/g);

This should work as well
code:
var sMessage = "[n]stuff[/n] hey wow [n]more stuff[/n]";
var NoParse = sMessage.match(/\[n\].+?\[\/n\]/mgi);

Your results would be
NoParse[0] = [n]stuff[/n]
NoParse[1] = [n]more stuff[/n]

This post was edited on 07-13-2006 at 09:58 AM by Silentdragon.
07-13-2006 09:56 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Help]Returning the inside of a string... - by andrewdodd13 on 07-12-2006 at 05:11 PM
RE: [Help]Returning the inside of a string... - by Pai on 07-12-2006 at 06:01 PM
RE: [Help]Returning the inside of a string... - by -dt- on 07-13-2006 at 03:13 AM
RE: RE: [Help]Returning the inside of a string... - by Pai on 07-13-2006 at 08:32 AM
RE: [Help]Returning the inside of a string... - by Silentdragon on 07-13-2006 at 09:56 AM
RE: [Help]Returning the inside of a string... - by -dt- on 07-13-2006 at 10:07 AM
RE: [Help]Returning the inside of a string... - by Pai on 07-13-2006 at 11:21 AM
RE: [Help]Returning the inside of a string... - by andrewdodd13 on 07-13-2006 at 11: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