title: R get strings between specific pattern
body: <p>I have a long string in R with a series of values that have this pattern:</p>
  <pre><code>list &lt;- '{s:K_01.01, y:01}=&quot;whatever&quot; and {s:K_02.01, y:02}=&quot;whatever&quot; and {s:K_03.01, y:03}=&quot;whatever&quot; and {s:K_01.01, y:01}=&quot;whatever2&quot; and {s:K_01.01, y:01}=&quot;whatever3&quot;'
  </code></pre>
  <p>I would like to extract and store in a data frame one column with all the strings that start with <strong>{s:K_01.01</strong> and end with <strong>&quot;</strong>, and disregard all the other strings.</p>
  <h3>Expected output:</h3>
  <pre><code>{s:K_01.01, y:01}=&quot;whatever&quot;
  {s:K_01.01, y:01}=&quot;whatever2&quot;
  {s:K_01.01, y:01}=&quot;whatever3&quot;
  </code></pre>
  <p>Does anyone know how?</p>