So we have:

```
    String test2 = "12+x+43+y+32-100";
    Map<String, String> values = new HashMap<String, String>();
    values.put("x", "3");
    values.put("y", "7");

    for (String key : values.keySet()) {
        if (test2.contains(key)) {
            String result = test2.replaceAll(key, values.get(key));
            System.out.println(result);
        }
    }

```

Output:

> 
> 12+3+43+y+32-100
> 
> 
> 12+x+43+7+32-100
> 
> 
> 

While it should be:

> 
> 12+3+43+7+32-100
> 
> 
>