title: How to match a group of lines that match a pattern
body: <p>I am trying to filter out a group of lines that match a pattern using a regexp but am having trouble getting the correct regexp to use.</p>
  
  <p>The text file contains lines like this:</p>
  
  <pre><code>transaction 390134; promote; 2016/12/20 01:17:07 ; user: build
    to: DEVELOPMENT ; from: DEVELOPMENT_BUILD
    #  some commit comment
    /./som/file/path 11745/409 (22269/257) 
  
    # merged
    version 22269/257 (22269/257)
    ancestor: (22133/182)
  
  transaction 390136; promote; 2016/12/20 01:17:08 ; user: najmi
    to: DEVELOPMENT ; from: DEVELOPMENT_BUILD
    /./some/other/file/path 11745/1 (22269/1) 
  
    version 22269/1 (22269/1)
    ancestor: (none - initial version)
    type: dir
  </code></pre>
  
  <p>I would like to filter out the lines that start with "transaction", contain "User: build all the way until the next line that starts with "transaction".</p>
  
  <p>The idea is to end up with transaction lines where user is not "build".</p>
  
  <p>Thanks for any help.</p>