title: how to format string output using % in ruby?
body: <p>I want to format the output of a string in ruby. I can do it using % but I cannot figure it out.</p>
  
  <p>Instead of <code>201107070928</code> I want to output <code>2011\07\070928</code></p>
  
  <pre><code>puts "%.4s\\%.2s\\%s" % "201107070928"
  </code></pre>
  
  <p>gives me an error:`%': too few arguments (ArgumentError)</p>