Ant ReplaceRegExp task changing a line it shouldn't <p>I was updating an xml file with a version/build number. It was working just fine but then a developer put in some new lines of code and for some reason one of those lines gets changed. Here is my regex:</p> <pre><code>`&lt;replaceregexp file="${basedir}Monitors\Invos\Trunk\InvosWPF\InvosSettings.xml" match="&amp;lt;ConfigurationVersion value=\&amp;quot;[0-9.]* " replace="&amp;lt;ConfigurationVersion value=\&amp;quot;${ver_bldnum}" byline="false"/&gt;` </code></pre> <p>Its messing with ChannelLabel2 value. Before the regex: <code>&lt;ChannelLabels&gt; &lt;ChannelLabel0 value="L"/&gt; &lt;ChannelLabel1 value="R"/&gt; &lt;ChannelLabel2 value="Sâ‚"/&gt; &lt;ChannelLabel3 value="Sâ‚‚"/&gt; &lt;/ChannelLabels&gt;</code></p> <p>After the regex: <code>&lt;ChannelLabels&gt; &lt;ChannelLabel0 value="L"/&gt; &lt;ChannelLabel1 value="R"/&gt; &lt;ChannelLabel2 value="Sâ‚?"/&gt; &lt;ChannelLabel3 value="Sâ‚‚"/&gt; &lt;/ChannelLabels&gt;</code></p> <p>Its inserting a ? for some reason. The only line I want it to change is:</p> <pre><code>`&lt;ConfigurationVersion value="1.0.0.92" /&gt;` </code></pre> <p>Thanks for any help or suggestions. </p>