title: How to separate a concatenated string when first word (same beginning string pattern) of every observation contains a different ending string in R?
body: <p>In R I have a much larger data set with the issue I need to resolve.  So I have a data frame in R and the first word of every observation in the <code>Post</code> variable has a concatenated string.  Fortunately the beginning of the string contains the same word but the ending of the concatenated string is always different. Would anyone know of a function that can separate <code>Introduction</code> from the word it is connected (attached) to a string of words? In other words, how can you separate a concatenated string when first word ("<code>Introduction</code>" the same beginning string pattern)  of every observation contains a different ending string in R? </p>
  
  <p><strong>UPDATE: complete and reproducible question</strong> </p>
  
  <pre><code> dat &lt;- data.frame(author=c("a", "b", "c", "d", "a", "b", "c", "d", "e", "a", "a", "a","a", "a", "c","c","c","c"),Post=c("Introductiontwo text", "IntroductionYoua need Introduction to give a complete and reproducible questionone text", "IntroductionYouas need Introduction to give a complete and reproducible questionthre text", "IntroductionYouasd need Introduction to give a complete and reproducible questionnice text", "IntroductionYouasds need Introduction to give a complete and reproducible questionwow text", "IntroductionYouasdsh need Introduction to give a complete and reproducible questionone text", "IntroductionYouasdshs need Introduction to give a complete and reproducible questionone text", "IntroductionYouasdshsa need Introduction to give a complete and reproducible questionone text", "IntroductionYouasdshsas need Introduction to give a complete and reproducible questionone text", "IntroductionYouasdshsasa need Introduction to give a complete and reproducible questionone text","IntroductionYouasdshsasaa need Introduction to give a complete and reproducible questionone text", "IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text","IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text", "IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text","IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text", "IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text","IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text", "IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text"))
  
  
  dat
  
           author                                                                                              Post
  1       a                                                                              Introductiontwo text
  2       b           IntroductionYoua need Introduction to give a complete and reproducible questionone text
  3       c         IntroductionYouas need Introduction to give a complete and reproducible questionthre text
  4       d        IntroductionYouasd need Introduction to give a complete and reproducible questionnice text
  5       a        IntroductionYouasds need Introduction to give a complete and reproducible questionwow text
  6       b       IntroductionYouasdsh need Introduction to give a complete and reproducible questionone text
  7       c      IntroductionYouasdshs need Introduction to give a complete and reproducible questionone text
  8       d     IntroductionYouasdshsa need Introduction to give a complete and reproducible questionone text
  9       e    IntroductionYouasdshsas need Introduction to give a complete and reproducible questionone text
  10      a   IntroductionYouasdshsasa need Introduction to give a complete and reproducible questionone text
  11      a  IntroductionYouasdshsasaa need Introduction to give a complete and reproducible questionone text
  12      a IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text
  13      a IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text
  14      a IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text
  15      c IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text
  16      c IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text
  17      c IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text
  18      c IntroductionYouasdshsasaaa need Introduction to give a complete and reproducible questionone text
  </code></pre>