I would not suggest a RegEx if the target contents are ALWAYS the same value with random spacing. I would just remove all spaces from the input text and search for substring containment (Contains()).
thines01
Postaholic
2,425 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
OK. I've changed my mind -- I would use a RegEx to remove anything but digits and then evaluate.
Imports System.IO
Imports System.Text.RegularExpressions
Module Module1
Sub Main()
Dim fileIn As New StreamReader("..\..\TextFile1.txt")
Dim strData As String = ""
Dim lngCount As Long
'
While (Not (fileIn.EndOfStream))
strData = Regex.Replace(fileIn.ReadLine(), "[^0-9]", "")
lngCount = lngCount + 1
If (strData.Equals("2706110256487952")) Then
' Got it
Console.WriteLine("Found on line {0}: {1}", lngCount, strData)
End If
End While
fileIn.Close()
End Sub
End Module
thines01
Postaholic
2,425 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402