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: [email protected]
Reporter: [email protected]
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.