For Each dr As DataRow In DataTables("数据").Select("")
Dim mc = System.Text.RegularExpressions.Regex.Matches(dr("案号"), "(?<=.+?)[0-9]+(?=号)")
Dim i As Integer = val(mc(0).value)
dr("调整后案号") = System.Text.RegularExpressions.Regex.replace(dr("案号"), "(?<=.+?)[0-9]+(?=号)", Format(i, "0000"))
Next
'---------
For Each dr As DataRow In DataTables("数据").Select("")
Dim mc = System.Text.RegularExpressions.Regex.Matches(dr("调整后案号"), "(?<=.+?)[0-9]+(?=号)")
dr("案号") = System.Text.RegularExpressions.Regex.replace(dr("调整后案号"), "(?<=.+?)[0-9]+(?=号)", cstr(val(mc(0).value)))
Next
[此贴子已经被作者于2017/1/12 20:27:24编辑过]