如何将行的开头与关键字“dog”匹配,结尾是等号我没有工作
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim iString As String = "cats=123" & vbCrLf & "dog=456"
Dim q1 = System.Text.RegularExpressions.Regex.Match(iString, "^dog=")
If q1.Success Then
Debug.Print("found")
Else
Debug.Print("not found")
End If
End Sub