标签:print for highlight class 转义 tsp 符号 转义字符 rgs
1、split()
public class testSplit { public static void main(String[] args) { String a1 = "1^6^3^5"; String[] m1 = a1.split("\\^"); for(String n:m1){ System.out.println(n); } } }
结果:
1 6 3 5
public class testSplit { public static void main(String[] args) { String a1 = "1^6=3=5"; String[] m1 = a1.split("\\^|="); for(String n:m1){ System.out.println(n); } } }
结果:
1 6 3 5
标签:print for highlight class 转义 tsp 符号 转义字符 rgs
原文地址:https://www.cnblogs.com/seven717/p/12884377.html