title: How to extract only number from string which start with number using MongoDB
body: <p>How to extract the only number from string which starts with number in MongoDB </p>
  
  <p>I want to extract the number from a string which starts with the number.</p>
  
  <p>I have a collection which contains document like</p>
  
  <pre><code>  {
      "address" :"1103 wood crest"
    },
    {
      "address": "223 NW 28TH ST"
    },
    {
      "address": "NW 28TH ST"
    },
    {
      "address": "28TH ST ava"
     }
  </code></pre>
  
  <p>I want to write aggregation query, which gives result in below format: below:</p>
  
  <pre><code>{
    "number": "1103",
    "address" :"wood crest"
  },
  {
    "number": "223",
    "address": "223 NW 28TH ST"
  },
  {
    "number": "",
    "address": "NW 28TH ST"
  },
  {
     "number": "",
     "address": "28TH ST ava"
   }
  </code></pre>