
FouthFrame.answerArr[j] = FouthFrame.answerArr[j].replace(/([ ]{1})/g,"");
FouthFrame.answerArr[j] = FouthFrame.answerArr[j].replace(/,/g,"");
FouthFrame.answerArr[j] = FouthFrame.answerArr[j].replace(/。/g,"");
FouthFrame.answerArr[j] = FouthFrame.answerArr[j].replace(/:/g,"");
FouthFrame.answerArr[j] = FouthFrame.answerArr[j].replace(/;/g,"");
FouthFrame.answerArr[j] = FouthFrame.answerArr[j].replace(/,/g,"");
var str:String="是 我们 呀CuPlay er.com网站" function trim(string:String):String {
return string.replace(/([ ]{1})/g,"");
}
trace(trim(str)) //[ ]内是一个中文空格一个英文空格
//{1}是说匹配一个到多个
///g是说可连续匹配
//去空格,实际上就是把空格替换成空字符串