81,092
社区成员
发帖
与我相关
我的任务
分享
String test = "\"1\" \"gu55555@163.com\" \"氏の氏名4\"";
String pattern = "\"([^\"]+)\"";
Matcher m = Pattern.compile(pattern).matcher(test);
while(m.find())
{
System.out.println(m.group(1));
}
String str= "\"1\" \"gu55555@163.com\" \"氏の氏名4\"";
str=str.replaceAll("\"","");
String[] arr=str.split("\\s+");
System.out.println(Arrays.toString(arr));
class Test
{
public static void main(String [] args)
{
String s = "1 gu55555@163.com 氏の氏名4";
String [] ss = s.split("\\t");
for(String str : ss)
{
System.out.println(str);
}
}
}