ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bin Chen" <>
Subject How to use regexp replace task with ant 1.5
Date Tue, 14 Jan 2003 21:53:42 GMT
Hi, I am trying to use the replaceregexp task of ant 1.5 to match and
replace certain patterns, here is the sample:
           <regexp pattern=":_sample_command_marker"/>
               <substitution expression="@rem my substitution \n set
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.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message