title: sed insert characters between two pattern matches
body: <p>I'm working on this text file that has hundreds of lines that look like the condensed version below:</p>
  
  <pre><code># &lt;block_uid&gt;   # &lt;freq&gt; &lt;memop&gt; &lt;fpop&gt; &lt;insn&gt; &lt;line&gt; &lt;fname&gt; &lt;perc&gt;
  3941319690354688    # 776547959  2.232946   0
  3941427129090048    # 465293088 40  37  74 4.215079 0 
  3941427110739968    # 465558912 36  35  68
  </code></pre>
  
  <p>I'm trying to use sed to insert <strong>dfpattern</strong> in between <code>3941319690354688</code> and <code># 776547959</code> on each line because the file is way to large to be done manually.
  so after a 16 digit pattern and before the <code>#</code>
  i.e. it will look like this:</p>
  
  <pre><code># &lt;block_uid&gt;   # &lt;freq&gt; &lt;memop&gt; &lt;fpop&gt; &lt;insn&gt; &lt;line&gt; &lt;fname&gt; &lt;perc&gt;
  3941319690354688 dfpattern  # 776547959  2.232946   0
  3941427129090048 dfpattern  # 465293088 40  37  74 4.215079 0
  3941427110739968 dfpattern  # 465558912 36  35  68
  </code></pre>
  
  <p>I'm a novice at sed and I couldn't come up with the command fiddling around so I'm asking for help.
  Can you please explain the command you post briefly so I can learn from it.
  thank you!</p>