title: How to extract part of a strings in a column of a dataframe using R?
body: <p>(Sorry if I use the wrong terms and format horribly, this is my first post)</p>
  <p>I am trying to extract a specific part of a string from a dataframe. This is what the entire cell looks like:</p>
  <p>{temperature:6.689724,geographic location (longitude):-159.0224,collection date:2011-10-05/2011-10-06,environment (biome):marine biome (ENVO:00000447),environment (feature):mesopelagic zone (ENVO:00000213),environment (material):particulate matter, including plankton (ENVO:xxxxxxxx),environmental package:water,<strong>sample collection device or method:ROSETTE sampler with CTD (sbe9C) and 10 Niskin bottles</strong>,salinity:34.000507,geographic location (latitude):31.528,instrument model:Illumina Genome Analyzer IIx}</p>
  <p>I want to extract the bolded part and remove everything before and after it. I want to repeat this for every cell in that column, my original plan was to use str_extract() and remove the string before and including &quot;water,&quot; then use str_extract again to remove the string after and including &quot;salinity&quot;. Below is my attempt, and the output was that everything under Column1 got removed and replaced with <em>NA</em>.</p>
  <pre><code>df$Column1 &lt;- str_extract(df$Column1, &quot;(?&lt;=water, )(\\w+)&quot;)
  </code></pre>
  <p>Thank you in advance and sorry again for the formatting...</p>