码迷,mamicode.com
首页 > 其他好文 > 详细

拆分字符串

时间:2017-05-02 22:13:34      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:main   out   str   public   static   pre   div   nbsp   eal   

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" ));
        
    }

}

 

拆分字符串

标签:main   out   str   public   static   pre   div   nbsp   eal   

原文地址:http://www.cnblogs.com/zyy1130/p/6798530.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!