java字符串分割
程序员文章站
2022-04-22 18:09:53
...
*、java字符串split分割之多个分隔符
import java.util.*; import java.lang.*; import java.io.*; class Demo { public static void main (String[] args) throws java.lang.Exception { String str = "abc;123,456?999|haha"; String[] strs = str.split("[;,?|]"); for(String s : strs){ System.out.println(s); } } }