title: Java Regex ignoring newline character WITHOUT Dotall
body: <p>I have to parse returned emails for a specific object id. The problem is that, when the email is returned, the id may be split into several lines. Usually it should look like this:</p>
  
  <pre><code>foo#bar-20130101-103000#12345
  </code></pre>
  
  <p>whereat I'm interested in the last part "12345". The problem is that that string tends to be split by a newline, for example:</p>
  
  <pre><code>foo#bar-20130101-103000#12
  345
  </code></pre>
  
  <p>which causes my regex</p>
  
  <pre><code>[a-zA-Z0-9äöüÄÖÜß]{1,5}#[a-zA-Z0-9äöüÄÖÜß]{1,5}-\d{8}-\d{6}#(\d+)
  </code></pre>
  
  <p>to only find "12" instead of "12345". Now all the hints i find on the 'net are to use Pattern.MULTILINE and/or Pattern.DOTALL, but multiline only influences the ^ and $ anchors and dotall only makes . match on newline chars too. The problem is that i don't have a . here and it's not really applicable either, because i only want digits.
  So how can i make my regex match the whole thing and not stop at the line break?</p>