多个结果的时候,你获取最匹配那个(字数最多)
e.Form.Controls("TextBox1").text = "继发出血性肺炎"
For i As Integer = e.Form.Controls("TextBox1").lines.length-1 To 0 Step -1
Dim str As String = ""
For m As Integer = Tables("terms").rows.count -1 To 0 Step -1
Dim s As String = Tables("terms").Rows(m)("词语")
If e.Form.Controls("TextBox1").lines(i).Contains(s) = True
If str.length < s.length Then
str = s
End If
End If
Next
msgbox(str)
Next
[此贴子已经被作者于2017/9/21 11:15:35编辑过]