package com.cnic.flink.etl.test;
import java.util.HashMap;
import java.util.Map;
public class Map2Bean {
public static void main(String[] args) {
String str = "[tid:2656,Q:W183CWbcBewrSgccJOdw] ";
//String substring = str.substring(0, 10);
//System.out.println(substring);
//String sub001 = str.substring(0 ,10);
//System.out.println(sub001);
//int i = str.indexOf("[", "]");
String substring = str.substring(str.indexOf("[")+1, str.indexOf("]"));
System.out.println(substring);
HashMap<String, String> map = new HashMap<String, String>();
}
}
Java取出String字符串括号中的内容
最新推荐文章于 2024-07-29 21:23:37 发布