try this:

vb Code:
  1. Dim testStr As String = "this is 7777 7777 7777 7777"
  2.  
  3. Dim rx As New Regex("[0-9]{4}\s[0-9]{4}\s[0-9]{4}\s[0-9]{4}")
  4. MsgBox(Regex.Replace(rx.Match(testStr).Value, " ", ""))