title: How to insert a newline in front of a pattern?
body: <p>How to insert a newline before a pattern within a line?</p>
  
  <p>For example, this will insert a newline <em>behind</em> the regex pattern.</p>
  
  <pre><code>sed 's/regex/&amp;\n/g'
  </code></pre>
  
  <p>How can I do the same but <em>in front</em> of the pattern?</p>
  
  <p>Given this sample input file, the pattern to match on is the phone number.</p>
  
  <pre><code>some text (012)345-6789
  </code></pre>
  
  <p>Should become</p>
  
  <pre><code>some text
  (012)345-6789
  </code></pre>