20世纪中国最后的残酷"width=133heihgt=69border="0"/></a></td> <tdwidth="150"align="center"><ahref="http://news.sina.com.cn/s/p/2007-04-10/111912742782.shtml"target="_blank"><imgsrc="http://image2.sina.com.cn/dy/s/p/2007-04-10/U1043P1T1D12742782F21DT20070410111948_small_133.jpg"alt="图文:老黄在露天召集各分点的负责人开会
我要把”20世纪中国最后的残酷"后面的全部过滤掉

解决方案 »

  1.   

    If the String is like what you gave us, you can do it this way:String[] strArray = yourString.split("\"width", "");String output = strArray[0];
      

  2.   

     s.substring(0, s.indexOf("\""));
      

  3.   

    我知道也是截字符串的方法。不知道楼主的目的是做什么。也可以用一下replace()函数。把自己不想要的字符或者符号替换成空。具体应用看一下帮助文档。
      

  4.   

    楼主是要去掉 HTML 文档的标签留下普通文本吗?
      

  5.   

    给代码吧,虽然可能不是最简单的。
    public class StringSplit {
    public static void main(String args[]){
    String str = "20世纪中国最后的残酷\"width=dsadasdasdasda34234";

    String[] strArray = str.split("\"width");

    System.out.print(strArray[0]);
    }
    }
    20世纪中国最后的残酷
      

  6.   

    从残酷后面那个"号开始截就没错了。
    s.substring(0, s.indexOf("\""));
      

  7.   

    I am not willing to type English in CSDN. But in company there is no Chinese environment, because it's forbidden...
      

  8.   

    我不是愿意类型英语在csdn 。但在公司有没有中文环境的,因为它禁止...全英文状态工作  啊  汗个 ~Your English very good