如果省市等字符正常出现的话,就容易提取。如果写入不规范,那就肯定提取失败。
Dim str As String = "福建省泉州市惠安县山霞镇田边村委会159号"
Dim ary() As String = {"^", "省", "市", "县", "镇", "村|会", "$"}
For i As Integer = 0 To 5
For j As Integer = i To 0 Step -1
Dim mc = System.Text.RegularExpressions.Regex.Match(str, "(?<=" & ary(j) & ").+" & ary(i+1))
If mc.success Then
msgbox(ary(i+1) & ":" & mc.value)
Exit For
End If
Next
Next