Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Text.RegularExpressions
Imports System.IO
Dim fName As String = "c:\sql2008inst.log"
Dim testTxt As New StreamReader(fName)
Dim allRead As String = testTxt.ReadToEnd()
testTxt.Close()
Dim regMatch As String = "Installation operation completed successfully"
If Regex.IsMatch(allRead, regMatch) Then
MessageBox.Show("Found")
Else
MessageBox.Show("Not Found")
End If
|