title: removing 2 lines after doing a gsub
body: <p>I have a file in which I need to replace 4 lines with 2 lines in specific spots the first line I can replace successfully with the following code. But, now that I have replaced the first line, how can I replace the next line with the text "//comment".. and delete the two lines after it?</p>
  
  <p>For example:</p>
  
  <pre><code>String keyString = row.getKey();
  // see Table T1002.
  KeyParser keyParser;
  keyParser.parseKey(keystr, key);
  </code></pre>
  
  <p>To:</p>
  
  <pre><code>Key&amp; key = getKey();
  //comment
  </code></pre>
  
  <p>Code so far:</p>
  
  <pre><code>text = File.read(filepath)
  replace = text.gsub(/String keyString = row.getKey\(\);/, 'Key&amp; key = getKey();')
  File.open(filepath, "w") {|file| file.puts replace}
  </code></pre>
  
  <p>PS: Also how can I specify the search string without having to escape my parenthesis</p>