ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bin Chen" <binc...@bea.com>
Subject RE: Help with Replace regexp with ant 1.5
Date Fri, 31 Jan 2003 21:09:11 GMT
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 &#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: 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


Mime
View raw message