split如何同时使用多个分割条件

比如"a and b or c"
要分割成
a b c 三个单独的。


可以使用正则里面的或规则

"a and b or c".split("(and)|(or)")

这样就可以了。


比如
System.out.println(Arrays.toString("a and b or c".split("(and)|(or)")));
快乐渡过每一天,减肥坚持每一天