String str = "A=10!B=20!C=30!D=40!E=50!";
public static Map<String, String> split(String str)
{
Matcher m = Pattern.compile("([^!]+)=([^!]+)").matcher(str);
Map<String, String> map = new HashMap<String, String>();
while (m.find())
{
map.put(m.group(1), m.group(2));
}
return map;
}