Would suggest you to start from here:
RichTextBox.Find Method (System.Windows.Forms) | Microsoft Docs[
^]
Reference example (not exactly you need, i.e. print per line part)
Public Function FindMyText(ByVal searchText As String, ByVal searchStart As Integer, ByVal searchEnd As Integer) As Integer
Dim returnValue As Integer = -1
If searchText.Length > 0 And searchStart >= 0 Then
If searchEnd > searchStart Or searchEnd = -1 Then
Dim indexToText As Integer = richTextBox1.Find(searchText, searchStart, searchEnd, RichTextBoxFinds.MatchCase)
If indexToText >= 0 Then
returnValue = indexToText
End If
End If
End If
Return returnValue
End Function
Try out!