当前位置:编程学习 > JAVA >>

java 截取字符串 拆分字符串

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

 

补充:软件开发 , Java ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,