title: How do you find-and-replace in a native Google Doc, using the Drive API?
body: <p>I need to do find and replace in a Google doc.  Essentially, I have a template Google Doc that I want to copy and customize, programatically.</p>
  
  <p>The original and the copy should both be in the native Gdoc format, and it should look the same before and after, in terms of visual layout and formatting.</p>
  
  <p>Tried downloading HTML (and other formats) via the exportLink, doing my find-and-replace on the output, then updating the content to be the output of the find-and-replace. But that screws up the formatting, and seems very... roundabout.</p>
  
  <p>I'm using the Ruby client, for what that's worth, but the main question is, what's the best practice for doing a find-and-replace in a native Doc?</p>