两种方法:
string one = "大家{@}好{@}啊";
一
string[] s1 = one.Split(new string[] { "{@}" }, StringSplitOptions.RemoveEmptyEntries);
二
one = one.Replace("{@}", ",");
string[] s2 = one.Split(',');
String a[] = one.split("{@}");
for(String p : a){
String s[] = p.split("_");
system.out.print(s[0]);
system.out.print(s[1]);
system.out.print(s[2);
试试这个。
这不就是按{@}分隔了么?