ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30456] - replaceregexp fails to insert '/' characters
Date Wed, 04 Aug 2004 07:44:56 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30456>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30456

replaceregexp fails to insert '/' characters





------- Additional Comments From bodewig@apache.org  2004-08-04 07:44 -------
Your basedir is not C:/projects/TestBug/src but C:\projects\TestBug\src and
the backslashes are special characters for the regexp engine, that's why you
get the results that you see.  Your replacement pattern would need the \ characters
that are part of the expansion of ${basedir} doubled or turned into forward 
slashes, unfortunately I don't know of an easy way to do that.

Wait, <pathconvert>?

<pathconvert property="basedir-converted" dirsep="/">
  <path>
    <pathelement location="."/>
  </path>
</pathconvert>

should do.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message