title: using sed with regular expression
body: <p>I want it to detect the following pattern in FILE_1:</p>
  
  <pre><code>STRING_1   :   "STRING_2"
  </code></pre>
  
  <p>and append STRING_2 to FILE_2</p>
  
  <p>This is what I have right now:</p>
  
  <pre><code>sed 's/STRING_1\s*:\s*"\([^"]*\)"/\1/g' FILE_1 &gt;&gt; FILE_2;
  </code></pre>
  
  <p>but this doesn't work, it appends a lot of random stuff to FILE_2(that are not supposed to match). Not sure what I did wrong ...</p>