解决方案 »

  1.   

    Matcher m = Pattern.compile("@(.*?)@").matcher(a);
    while(m.find()){
    System.out.println(m.group(1));
    }
      

  2.   

    String a="@12qq3@,,,@456@";
    Matcher m = Pattern.compile("@(.*?)@").matcher(a);
    while(m.find()){
    System.out.println(m.group(1));
    }
      

  3.   

    String a="@12qq3@,,,@456@";
    String[] arr=a.replace("@","").split("\\.{3}");
    System.out.println(Arrays.toString(arr));
      

  4.   

    m.group(1)   这个取出来 没有 @ 符号啊。。
      

  5.   

    不好意思,,我那个程序里面用的是m.group(0)
    谢谢啦!
      

  6.   

     String a="@12qq3@,,,@456@";
            Matcher m = Pattern.compile("@(.*?)@").matcher(a);
            while(m.find()){
                System.out.println(m.group(0).replaceAll("@", ""));
            }