[Solved] How to search a string of key/value pairs in Java
Use String.split: String[] kvPairs = “key1=value1;key2=value2;key3=value3”.split(“;”); This will give you an array kvPairs that contains these elements: key1=value1 key2=value2 key3=value3 Iterate over these and split them, too: for(String kvPair: kvPairs) { String[] kv = kvPair.split(“=”); String key = kv[0]; String value = kv[1]; // Now do with key whatever you want with key and value… … Read more