Splitting string

how can i turn a string like 1,1,1,1,1,1 into just 1
i tried using
string.indexof("," , 0)
and
var re:RegExp = /(,)/;
var results:Array = str.split(re);

neither of them seemed to know if there was a comma in the string[TABLE=“class: detailHeader”]
[TR]
[TD=“class: detailHeaderName”][/TD]
[TD=“class: detailHeaderParens”][/TD]
[TD=“class: detailHeaderType”][/TD]
[/TR]
[/TABLE]