匹配三种符号:空格 - #
@Test
public void contextLoads() {
String str = "Java string-split#test";
String[] split = str.split(" |-|#");
for (String s : split) {
System.out.println(s);
}
}
匹配三种符号:空格 - #
@Test
public void contextLoads() {
String str = "Java string-split#test";
String[] split = str.split(" |-|#");
for (String s : split) {
System.out.println(s);
}
}