例如,我可以这么做吗?
split = temp_string.Split("<beginning of record>")
那些你推荐的:
split = Regex.Split(temp_string,"< beginning of record >")
它不工作。它刚刚返回第一个字符“<” 和那些你推荐的:
Dim myDelims As String() = New String(){"< beginning of record >"} split = temp_string.Split(myDelims,StringSplitOptions.None)
这也不行。它也只返回第一个字符
尝试这个:
原文链接:https://www.f2er.com/vb/256080.htmlstring[] myDelims = new string[] { "<beginning of record>" }; split = temp_string.Split(myDelims,StringSplitOptions.None);
通过代码转换器运行这个结果是:
Dim myDelims As String() = New String() { "<beginning of record>" } split = temp_string.Split(myDelims,StringSplitOptions.None)
你也可能需要逃避V形,像这样:
"\< beginning of record \>"