title: Pattern matching and String Manipulation in R
body: <p>Here's the article data I have.</p>
  
  #
  
  <pre><code>inp &lt;- Sentence1+sentence2+.......+ LAST SENTENCE OF THE ARTICLE+A version of this article appears in print on 08/05/2015, on page C3 of the....
  </code></pre>
  
  <p>I would like to do two things.</p>
  
  <p>First, I would like to <strong>get rid of all of the sentences <em>from</em></strong> "A version of this article appears in print". </p>
  
  <p>Second, I would like to extract the <strong>C3</strong> in the "A version of this article appears in print on 08/05/2015, on page <strong>C3</strong>" sentence.</p>
  
  <p>I tried to do these with str_replace_all function, but I couldn't.</p>