title: Vi, replace text
body: <p>I have text like this</p>
  
  <pre><code>template
  template
  template_results
  template
  </code></pre>
  
  <p>And I need to replace it to this</p>
  
  <pre><code>template_form
  template_form
  template_results
  template_form
  </code></pre>
  
  <p>How can I replace every match of <code>template</code> that is not followed by <code>_</code> character in Vi?</p>
  
  <p>I tried it like this</p>
  
  <pre><code>:%s/template[^_]/template_form    - Pattern not found
  :%s/template\[^_]/template_form   - Pattern not found
  :%s/template[_]/template_form     - This works, but the pattern is opposite of what I need
  </code></pre>
  
  <p>Thank you :)</p>