var str = "1a2..b3.C4;56";str = str.replace(/[^0-9\.]/g,"").replace(/\./,",").replace(/\./g,"").replace(/,/,"."); print(str);
Standard input is empty
12.3456
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!