title: How can I capture a multiline pattern using a regular expressions in java?
body: <p>I have a text file that I need to parse using regular expressions. The text that I need to capture is in multiline groups like this:</p>
  
  <pre><code>truck
  zDoug
  Doug's house
  (123) 456-7890
  Edoug@doug.com
  30
  61234.56
  8/10/2003
  
  vehicle
  eRob
  Rob's house
  (987) 654-3210
  Frob@rob.com
  </code></pre>
  
  <p>For this example I need to capture truck followed by the next seven lines.In other words, in this "block" I have 8 groups. This is what I've tried but it will not  capture the next line:</p>
  
  <pre><code>(truck)\n(\w).
  </code></pre>
  
  <p>NOTE: I'm using the program <a href="http://gskinner.com/RegExr/desktop/" rel="noreferrer">RegExr</a> to test my regex before I port it to Java.</p>