ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bin Chen" <binc...@bea.com>
Subject Help with Replace regexp with ant 1.5
Date Tue, 14 Jan 2003 22:07:28 GMT
Hi, I am trying to use the replaceregexp task of ant 1.5 to match and
replace certain patterns, here is the sample:
<replaceregexp
    file="${Dest}/sample.cmd">
           <regexp pattern=":_sample_command_marker"/>
               <substitution expression="@rem my substitution \n set
CMD_HOME=@MY_HOME\mysample"/>
</replaceregexp>
Here "\n" is supposed to be a newline, and "\" in CMD_HOME is supposed to be
a direcory
However, when the substitution occured, all back slashes were taken out,
even when I tried using "\\n" and "\\", they were still taken out. Any idea
what happend there?
BTW, I am using jdk1.4.1_01 and jakarta ORO and jakarta regexp as
recommended by the ant document.

Your help is greatly appreciated.

Bin


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message