title: regex - Extract number from string. Number should be first 5 digit from my input
body: <p>I am new to regix.
  I want to get only port number from following line:</p>
  
  <p><strong>Input:</strong></p>
  
  <pre><code>Install: C:\Program Files\app
  Database: postgresql://127.0.0.1:42018/app
  Started: 2016-12-28 10:40:05.908000
  Lines: 1000000
  Version: 4.1
  PID: 1736
  </code></pre>
  
  <p>I tried following regex,</p>
  
  <pre><code>[\d]{5}
  </code></pre>
  
  <p>But it selects all
  42018, 10000 and 90800</p>
  
  <p>From the above input, I want to extract only port number <code>42018</code></p>