You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2003/05/28 17:09:19 UTC

DO NOT REPLY [Bug 20306] New: - regex match code does not handle $

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20306>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20306

regex match code does not handle $

           Summary: regex match code does not handle $
           Product: Ant
           Version: 1.6Alpha (nightly)
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: peter.reilly@corvil.com


Ant uses \num  to identify the matched group,
jdk14 and jakarta-oro uses $num to identify the
group. The code in ant correctly replaces the \
with $. However, it does not escape any $ on
the input.

The following 
   <replaceregex pattern="@([^@]+)@" replace="${\1}"/>
fails on jdk14 as Matcher#appendReplacement gets passed 
"${$1}" rather than "\${$1}".