create snippets
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
# escape.rb
def main()
ARGV.each do |arg|
puts(Regexp.escape(arg))
end
end
if __FILE__ == $0 then
main()
end
run
$ ./escape.rb "http://www.google.com/"
http://www\.google\.com/
:D
Top comments (0)