title: Extract text between certain symbols using Regular Expression in R
body: <p>I have a series of expressions such as: </p>
  
  <pre><code>"&lt;i&gt;the text I need to extract&lt;/i&gt;&lt;/b&gt;&lt;/a&gt;&lt;/div&gt;"
  </code></pre>
  
  <p>I need to extract the text between the <code>&lt;i&gt;</code> and <code>&lt;/i&gt;</code> "symbols". This is, the result should be: </p>
  
  <pre><code>"the text I need to extract"
  </code></pre>
  
  <p>At the moment I am using gsub in R to manually remove all the symbols that are not text. However, I would like to use a regular expression to do the job. Does anyone know a regular expression to extract the between <code>&lt;i&gt;</code> and <code>&lt;/i&gt;</code>?</p>
  
  <p>Thanks. </p>