What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] A simple regular expression function

[Request] A simple regular expression function
Author: Message:
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
35 / Male / Flag
Joined: Jan 2006
RE: [Request] A simple regular expression function
If they are all grouped together:

code:
StringObj.replace(/(.*)(A*)(.*)/i,"$1$3$2);

I personally can't think of a way to get all of them on the end however... This code might work but t is untested...

code:
var StringObj;
while(RegExp(".*A+[^A]+A*$","gi").exec(StringObj)){
    StringObj.replace(/(.*?)(A*)(.*)/i,"$1$3$2);
}

[Image: markee.png]
04-28-2008 11:14 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Request] A simple regular expression function - by Skarbo on 04-28-2008 at 09:33 AM
RE: [Request] A simple regular expression function - by markee on 04-28-2008 at 11:14 AM
RE: [Request] A simple regular expression function - by John Anderton on 04-28-2008 at 05:40 PM
RE: [Request] A simple regular expression function - by markee on 04-28-2008 at 08:48 PM
RE: [Request] A simple regular expression function - by Matti on 04-29-2008 at 04:43 PM
RE: [Request] A simple regular expression function - by Skarbo on 04-29-2008 at 04:52 PM
RE: [Request] A simple regular expression function - by markee on 04-30-2008 at 09:39 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