ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 57293] New: Substitutions containing \( are replaced by (
Date Mon, 01 Dec 2014 18:45:22 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=57293

            Bug ID: 57293
           Summary: Substitutions containing \( are replaced by (
           Product: Ant
           Version: 1.9.4
          Hardware: PC
                OS: Mac OS X 10.4
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
          Assignee: notifications@ant.apache.org
          Reporter: lheadley@kcptech.com

given file prep.js with contents:
hi

and the following build.xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="abc" default="build">
  <target name="build">
    <replaceregexp file="./prep.js"
                   match="(.*)"
                   replace="\(abcd\)"/>
  </target>

</project>

running "ant" results in prep.js containing:
(abcd)

rather than the expected:
\(abcd\)

We ran into this bug in a production system using replaceregexp to insert the
contents of one file into another. This method is widely recommended on the
webs and will fail for any file containing, e.g. a regular expression matching
a parenthesis (e.g. the javascript /\(/).

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

Mime
View raw message