正则表达式

 形如"ed.txt*2343rdgrgs3*,fgf.rar*sdf435hf*http://www.818u.com,http://www.k518.com",需要使用正则表达式删除两段*号之间(包含*)的字符,请高手指导

public class MainDemo
{

    public static void main(String []args)
    {     
     String str = "ed.txt*2343rdgrgs3*,fgf.rar*sdf435hf*";
        str = str.replaceAll("
\\*.*?\\*","");
        System.out.println(str);


    }
}

posted on 2011-07-17 21:44  maomaom  阅读(113)  评论(0编辑  收藏  举报

免费发布信息免费发布供求信息免费发布分类信息