简体   繁体   中英

In java i want to split the string and put it as key value pair

below is my string

status=OK;entries[url= http://www.krak.dk/53504900/s%C3%B8g.cs;datasource=KRAK_YELLOW_DATA;matchstring=hitlist;url=http://www.krak.dk/53504900/s%C3%B8g.cs;datasource=KRAK_YELLOW_DATA;matchstring=hit-list;]

i want to make the above string as key value pair like below

status = OK entries=url= http://www.krak.dk/53504900/s%C3%B8g.cs;datasource=KRAK_YELLOW_DATA;matchstring=hitlist;url=http://www.krak.dk/53504900/s%C3%B8g.cs;datasource=KRAK_YELLOW_DATA;matchstring=hit-list

you can use split method in java. Below is the link: http://www.tutorialspoint.com/java/java_string_split.htm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM