$line = 'this-is-a-regular-expression';$line = $line.gsub(/^(\w+)\b(.*)\b/, "\\1\n\\2"); print $line;
Standard input is empty
this -is-a-regular-expression
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!