The regexpreplace task took the "\\" and returned with nothing. It also
happened to $ and other meta charactors. It seems to me that doubling up the
meta charactors does not really work as it did in Java code. Is this a bug
or I simply missed something completely?
Thank you very much!!
Bin
-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: Friday, January 31, 2003 3:02 AM
To: ant-user@jakarta.apache.org
Subject: Re: Help with Replace regexp with ant 1.5
Sorry for the late reply
On Thu, 16 Jan 2003, Bin Chen <binchen@bea.com> wrote:
> <replaceregexp file="${MYDir}/mycommand.cmd">
> <regexp pattern=":_insertpathhere"/>
> <substitution expression="@rem My path 

> set MY_HOME=@ROOT@#x5c;mybindir"/>
> </replaceregexp>
>
> Here is the output I expect to have
> @rem My path
> set MY_HOME=@ROOT\mybindir
>
> What I got with the about <replaceregexp> is
> @rem My path
> set MY_HOME=@ROOTmybindir
What do you get if you simply use \\ instead of \ in above
substitution?
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: ant-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: ant-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-user-help@jakarta.apache.org
|