Dim data As String = "宇,13417XXXX86,广东省汕头市澄海区凤翔街道 南门头XX园94幢302 ,515800"
Dim arr() As String = data.split(",")
msgbox(arr(0))
msgbox(arr(1))
msgbox(arr(3))
Dim str As String = arr(2)
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
http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=113910&skin=0