I want to take a string and strip out specified characters. In the case of this sample, I'm removing "(", ")", and ";".

I'm taking the string, and placing each character in an array if is ISN'T one of my no-no characters, but then I can't get it back to a string. I'm using toString() but unfortunately it includes the commas, which I don't want.

Can someone help me figure out how to turn this back into a regular string?

OR is there a simpler way to accomplish my objective?

Thanks so much in advance,

Mike

code:

var testName = "()hello();;";
trace("testName = " + testName);
testNameArray = new Array();
for(i=0;i<testName.length;i++){
newChar = testName.charAt(i);
trace("char " + i + " = " + newChar);
if((newChar != "(") && (newChar != ")") && (newChar != ";")){
testNameArray.push(newChar);
}
}
trace("testNameArray = " + testNameArray);
testName = testNameArray.toString();
trace("testName = " + testName);