以下是引用有点蓝在2022/5/9 13:45:00的发言:
Dim s As String = "我看过《鲁迅》,《唐诗三百首》,《安徒生童话》等等。"
Dim p As String = "(?<=《).*?(?=》)"
Dim rgx = New System.Text.RegularExpressions.Regex(p, System.Text.RegularExpressions.RegexOptions.IgnoreCase)
For Each match As System.Text.RegularExpressions.Match In rgx.Matches(s)
Output.Show(match.Value )
Next
Dim shus As New List(Of String)
shus = DataTables("学生管理").SQLGetValues("备注")
Dim i As Integer
Dim p As String = "(?<=《).*?(?=》)"
Dim rgx = New System.Text.RegularExpressions.Regex(p, System.Text.RegularExpressions.RegexOptions.IgnoreCase)
For i = 0 To names.Count - 1
For Each match As System.Text.RegularExpressions.Match In rgx.Matches(shus(i))
Output.Show(match.Value )
Next
Next
为什么我这样不行?