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:[EMAIL PROTECTED]]
Sent: Friday, January 31, 2003 3:02 AM
To: [EMAIL PROTECTED]
Subject: Re: Help with Replace regexp with ant 1.5


Sorry for the late reply

On Thu, 16 Jan 2003, Bin Chen <[EMAIL PROTECTED]> wrote:

> <replaceregexp file="${MYDir}/mycommand.cmd">
>   <regexp pattern=":_insertpathhere"/>
>   <substitution expression="@rem My path &#x0A;
>      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 &#x5c; in above
substitution?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to