我的字符串包含值为
=字段!EmpID.Value##=字段!ChequeName.Value##=字段!address.Value
等等,具有相同模式的多个值
我必须在vb.net中只提取像 EmpID,ChequeName,地址 等的值
答案 0 :(得分:0)
试试这个:
Dim errString As String
Dim correctString As String
Dim Newstring As String
correctString = errString.Replace("=Fields!", "");
Newstring = correctString.Replace(".Value##", ",");
Newstring = Newstring .Replace(".Value", "");
答案 1 :(得分:0)
试试这个
Dim inStr As String = "=Fields!EmpID.Value##=Fields!ChequeName.Value##=Fields!address.Value"
Dim correctStr As String = inStr.Replace("=Fields!", "").Replace("##", ",").Replace(".Value", "")
输出
EmpID,ChequeName,address