public class Main {/*n o w j a v a . c o m 提供*/
public static void main(String[] args) {
String s = "One:Two;Three|Four\tFive";
String regex = "[:;|\\t]";
String strings[] = s.split(regex);
for (String word : strings)
System.out.println(word);
}
}
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。