Dim str As String = "二〇一七年六月二十二日" Dim s As String = "〇一二三四五六七八九"
Dim ns As String = "" For i As Integer = 0 To str.length-1 If str(i) = "年" OrElse str(i)= "月" Then ns &= "-" ElseIf str(i) = "日" Then '不操作 ElseIf str(i) = "十" Then If str(i-1) = "年" OrElse str(i-1) = "月" Then ns &= "1" End If Else Dim idx As Integer = s.IndexOf(str(i)) If idx >= 0 Then ns &= idx End If End If Next