Find Match Method

  • Thread starter Thread starter J0hnny09
  • Start date Start date
J

J0hnny09

Guest
Hi Newbie here I was trying to use Match method for my program that will call string from text box and display to richtextbox

Is it possible ? thanks in advance :)

text file :

Order 01 1:00 pm Aug 25,2020
Burger and fries
Ammount:5$

Order 02 2:00 pm Aug 25,2020
Chicken and fries
Ammount:8$

Order 03 3:00 pm Aug 25,2020
Pasta with Garlic Bread
Ammount:8$


Output on RTB:
when i find Order 03 the display would be this

Order 03 3:00 pm Aug 25,2020
Pasta with Garlic Bread
Ammount:8$




My attempt code is this:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

Dim Findstring = IO.File.ReadAllText("C:\Copy.txt")
Dim Lookfor As String = "Order03"

If Findstring.Contains(Lookfor) Then
RichtextBox1.Text = (Lookfor)
End If
End Sub

Continue reading...
 
Back
Top