title: Match two lists, one with partial strings and another with full string, return the whole string if match
body: <p>Match two lists in R, one with partial strings and another with full string, return the whole string if matches. Return only the unique matches (once). </p>
  
  <p>So, let's say I have a CSV file and each row has a long string (the long list). Then, I shorten the string using substr, and then I drop any duplicate strings using unique. Then I want to compare the long string list <code>df12</code> with the unique short list <code>df14</code>, and if there are unique matches on partial string search (<code>df14</code> vs <code>df12</code>),  then return the whole string from <code>df12</code>.</p>
  
  <p>This is <code>df12</code> (long string list)</p>
  
  <pre><code>    [1] I like stackoverflow very much today
      [2] I like stackoverflow much today
      [3] I dont like stackoverflow very much today
      [4] I dont like you!
      [5] What? 
  
  df13&lt;-substr(df12, start=0, stop=30)
  </code></pre>
  
  <p>This is <code>df13</code> (shortened strings - not unique)</p>
  
  <pre><code>[1] I like stacko
  [2] I like stacko
  [3] I dont like s
  [4] I dont like y
  [5] What? 
  df14&lt;-unique(df13)
  </code></pre>
  
  <p>This is <code>df14</code> (shortened strings - unique strings after applying unique method)</p>
  
  <pre><code>    [1] I like stacko
      [2] I dont like s
      [3] I dont like y
      [4] What? 
  </code></pre>
  
  <p>This is the result that I want in the end</p>
  
  <pre><code>    [1] I like stackoverflow very much today
      [2] I dont like stackoverflow very much today
      [3] I dont like you!
      [4] What?
  </code></pre>