title: Help with sed regex: extract text from specific tag
body: <p>First time sed'er, so be gentle.</p>
  
  <p>I have the following text file, 'test_file':</p>
  
  <pre><code> &lt;Tag1&gt;not &lt;/Tag1&gt;&lt;Tag2&gt;working&lt;/Tag2&gt;
  </code></pre>
  
  <p>I want to extract the text in between <code>&lt;Tag2&gt;</code> using sed regex, there may be other occurrences of <code>&lt;Tag2&gt;</code> and I would like to extract those also.</p>
  
  <p>So far I have this sed based regex:</p>
  
  <pre><code>cat test_file | grep -i "Tag2"| sed 's/&lt;[^&gt;]*[&gt;]//g'
  </code></pre>
  
  <p>which gives the output:</p>
  
  <pre><code> not working
  </code></pre>
  
  <p>Anyone any idea how to get this working? </p>