re = /(?:^.*:\R|\G)\K /str = 'list: - first'result = str.gsub(re, ' ') 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!