求大神帮忙,后台如何获取多个字段
例如:this.testbox.text="【删除】XXX.JPG【删除】XXX.text【删除】XXX.doc"
该如何获得删除后面的文件名称和格式
[解决办法]
this.testbox.text="【删除】XXX.JPG【删除】XXX.text【删除】XXX.doc"
string[] temp=testbox.text.Replace("【删除】",'
[解决办法]
').Split('
[解决办法]
');
[解决办法]
string s = "【删除】XXX.JPG【删除】XXX.text【删除】XXX.doc";
MatchCollection matches = Regex.Matches(s, @"【删除】([^【】]+)");
foreach (Match match in matches)
Response.Write(match.Groups[1].Value + "<br/>");
string s = "【删除】XXX.JPG【删除】XXX.text【删除】XXX.doc";
string[] filenames = Regex.Matches(s, @"【删除】([^【】]+)").Cast<Match>().Select(x => x.Groups[1].Value).ToArray();
for (int i = 0; i < filenames.Length; i++)
Response.Write(filenames[i] + "<br/>");