str = "list:\n - first"result = str.gsub(/(?:\G|^) /, ' ')puts result
Standard input is empty
list: - first
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!