标签:void AC spl 处理 eth code ddr todo 符号
一、单个符号作为分隔符
package com.regix; public class FuncSpilt { public static void main(String[] args) { // TODO Auto-generated method stub String address = "上海|上海市|闵行区|吴中路"; //String[] splitAddress=address.split("\\|"); String splitAddress[]=address.split("\\|"); System.out.println(splitAddress[0]+splitAddress[1]+splitAddress[2]+splitAddress[3]+splitAddress.length); } }
二、多个符号作为分隔符
package com.regix; public class FuncSpilt { public static void main(String[] args) { // TODO Auto-generated method stub String address="上海^上海市@闵行区#吴中路"; String[] splitAddress=address.split("\\^|@|#"); System.out.println(splitAddress[0]+splitAddress[1]+splitAddress[2]+splitAddress[3]+splitAddress.length); } }
总结:
标签:void AC spl 处理 eth code ddr todo 符号
原文地址:https://www.cnblogs.com/iloverain/p/9004648.html