用正则怎么表示这个字串<meta http-equiv="content-type" content="text/html; charset=utf-8">

解决方案 »

  1.   

    楼主,没说明白吧?内容是固定的?就是你写的
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    这句?如果是固定内容,那还用正则表达式干什么?计数用?
      

  2.   

    不是 我得把一个文件中的内容复制到另一个文件中,但是另一个文件中要把这句给删了<meta http-equiv="content-type" content="text/html; charset=utf-8"> ,我这样用的str=str.replaceAll("<meta http-equiv=\"content-type\" content=\"text//html; charset=utf-8\">", "")但是不丁啊!所以就想用正则把这句话模糊的表示出来,然后替换
      

  3.   

    str=str.replaceAll(" <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">", "")