You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2014/12/02 08:51:51 UTC

[Bug 57293] Substitutions containing \( are replaced by (

https://issues.apache.org/bugzilla/show_bug.cgi?id=57293

--- Comment #1 from Jan Mat <ja...@materne.de> ---
The problem is that the \ starts a backreference (like \1) so it must be
quotet.
Four slashes ...

This one works for me:

    <target name="testMatching_Bug57293">
        <mkdir dir="${output}"/>
        <echo file="${output}/text.txt">Hello, world!</echo>
        <replaceregexp match="(\w*)" replace="\\\\(abcd\\\\)">
          <file file="${output}/text.txt"/>
        </replaceregexp>
        <au:assertResourceContains
           resource="${output}/text.txt" value="\(abcd\), world!"/>
    </target>

-- 
You are receiving this mail because:
You are the assignee for the bug.