How to make a regex? : I need to make a regex which matches with pattern like:-

1.data1,data2 

2.data1

but not with data1&data2 or any other special character apart from ','.
I have tried few like flag_regex = new RegExp("[a-zA-Z0-9].*,.*[a-zA-Z0-9]*");

but its only matches with first pattern not the second one. 
I am doing this in javascript.