Greetings
what iam trying to do is loop thru a checkedlistbox i open a file and theres text files in the checkedlistbox all checked, want to search thru all text files adding all found items in lstListBox1.Items.Add(m.Value)
i can do 1 file at a time , below is some code i been working with
Thank you for any help on this.
Best,RegardsCode:Dim options As RegexOptions = RegexOptions.Multiline Dim testStr As String = IO.File.ReadAllText(openFileDialog1.FileName) Dim rx1 As New Regex(" My regex here") Dim n As Integer = testStr.Count 'CheckedListBox1 For n = 0 To (CheckedListBox1.Items.Count - 1) If CheckedListBox1.GetItemChecked(n) = True Then MsgBox(CheckedListBox1.CheckedItems.Item(n)) For Each m As Match In rx1.Matches(testStr) lstListBox1.Items.Add(m.Value) Next End If Next


Reply With Quote