text = " -45.124, 1124.325"puts text.scan(/[+-]?\d+(?:\.\d+)?/)
Standard input is empty
-45.124 1124.325
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!