以下の文字列を変換するにはどうすればよいですか、
"[""1"",""2"",""3""]"
これに、
["1","2","3"]
私は成功せずにこれを試しました:
Replace(string, """", "")
以下の文字列を変換するにはどうすればよいですか、
"[""1"",""2"",""3""]"
これに、
["1","2","3"]
私は成功せずにこれを試しました:
Replace(string, """", "")
私が正しく理解していれば、次のようなことを試すことができます:
Dim s As String = "[""1"",""2"",""3""]"
Dim collection As System.Text.RegularExpressions.MatchCollection = System.Text.RegularExpressions.Regex.Matches(s, "\d+")
Dim svals As String = ""
For Each m As System.Text.RegularExpressions.Match In collection
If svals = String.Empty Then
svals = m.Value
Else
svals = svals & "," & m.Value
End If
Next
Dim rr() As String
rr = svals.Split(",") ' Result as array of string