You are iterating over the string while you are modifying it. Please add a unit test that has a single string with multiple colon synonyms in it.