require 'shellwords's = "Seán"puts s.gsub(/([^\p{L}0-9_.,:\/@\n-])/, "\\\\\\1")
Standard input is empty
Seán
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!