Index: DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/XmlAdapter.cs =================================================================== diff -u -r5653 -r5915 --- DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/XmlAdapter.cs (.../XmlAdapter.cs) (revision 5653) +++ DamEngine/trunk/src/Deltares.DamEngine.TestHelpers/XmlAdapter.cs (.../XmlAdapter.cs) (revision 5915) @@ -32,14 +32,15 @@ { /// /// Changes in an XML the value of all elements with the specified key to the specified value. + /// The key will be found only if it is a whole word. /// /// The input. /// The key. /// The value. /// The modified input public static string ChangeValueInXml(string input, string key, string value) { - string searchString = key + "=" + "\"([^\"]*)\""; // This means match any pattern which matches ="" + string searchString = "\\b" + key + "=" + "\"([^\"]*)\""; // This means match any pattern which matches ="" string replacement = key + "=\"" + value + "\""; // Replace with ="" string result = Regex.Replace(input, searchString, replacement, RegexOptions.IgnorePatternWhitespace); return result;