quote:
Originally posted by Mattike
Could you try to find some time to get it working in some way?
Got it working now
code:
function moveToEnd(oString,sub){
var re = RegExp(".*?"+sub+"+(?!$)","gim");
eString = oString;
while(re.exec(oString) != null){
eString = eString.replace(RegExp("(.*?)("+sub+"+)(.*)","gi"),"$1$3$2");
}
return eString;
}
This has FAR less itterations and should respond quicker. Realy I should do error checking to make sure
sub is only a single character, but if you are carful then there shouln't be any problem and will work faster.
I hope this helps