主页 > 知识库 > 网络编程 > JSP/Java >

java 截取字符串 拆分字符串

来源:中国IT实验室 作者:佚名 发表于:2013-07-08 13:28  点击:
public class splitTest { public static void main(String[] args) { String s = new String(SPAN style=LINE-HEIGHT: 28px; FONT-FAMILY: Helvetica, Tahoma, Arial, sans-serif; COLOR: rgb(51,51,51)90_python/SPAN); String a[] = s.split(SPAN style=F
 public class splitTest  {
  public static void main(String[] args)
  {
  String s = new String("<SPAN style="LINE-HEIGHT: 28px; FONT-FAMILY: Helvetica, Tahoma, Arial, sans-serif; COLOR: rgb(51,51,51)">90_python</SPAN>");
  String a[] = s.split("<SPAN style="FONT-FAMILY: Helvetica, Tahoma, Arial, sans-serif">_</SPAN>");
  System.out.println(a[0]);
  System.out.println(a[1]);
  }
  }

    有帮助
    (0)
    0%
    没帮助
    (0)
    0%