拆分字符串

public class zuihouyiti {

    public static void main(String[] args) {
        String s="01#张三#20*02#李四#30*03#王五#40";
        String s1=s.replaceAll("#", " ");
        System.out.println(s1.replaceAll("\\*", "\n" ));
        
    }

}

 

posted @ 2017-05-02 21:21  苏轼的红烧肉  阅读(135)  评论(0编辑  收藏  举报