title: RegEx to extract first set of digits only
body: <p>I am trying to extract the 1st group of digits from this expression "CSTAR ADJ REF # A-3080101078AZ Keying error Deposit $ 938,710.33 on 05/20/2011 item keying". That is, i want to get only "3080101078" as result in an adjacent cell. </p>
  
  <p>I have tried using this:</p>
  
  <pre><code>Function CleanString(strIn As String) As String
      Dim objRegex
      Set objRegex = CreateObject("vbscript.regexp")
      With objRegex
          .Global = True
          .Pattern = "[^0-9\s]"
          CleanString= Trim(.Replace(strIn, vbNullString))
      End With
  End Function
  </code></pre>
  
  <p>This is giving "3080101078     93871033  05202011". How can i get the first group of number only (3080101078) ? </p>