This version below works :) !!! Very good to know, and really the
easiest, most straight-forward way to handle double qoutes in your
source and target strings.

<replace file="testfile.txt" 
          token='JAVA_OPTIONS="${JAVA_OPTIONS}"'
          value='JAVA_OPTIONS="${JAVA_OPTIONS}
-Dweblogic.ProductionModeEnabled=${WEBLOGIC_PRODUCTION_MODE}"'/>

"The HTML entity for " is &quot;, not &quote;
(http://www.w3.org/TR/html401/sgml/entities.html#h-24.4.1). Did the OP
have a typo in his e-mail, or did he try the wrong entity?"

It was not a type-o in the email...I had it wrong.

Thanks everyone VERY MUCH!!!  Now hopefully it will work on unix as well
(I've only tested on windows so far.)


Thanks, Jeff

-----Original Message-----
From: Rick Genter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2008 2:27 PM
To: Ant Users List
Subject: RE: How do I escape the " in the replace command?

> From: Gilbert Rebhan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 24, 2008 1:15 PM
> To: Ant Users List
> Subject: Re: How do I escape the " in the replace command?
> 
> Simon Jeffrey schrieb:
> > I am trying to execute the command below as part of our weblogic 
> > install.
> > 
> > Yes the string is part of a file.
> > 
> > I have tried using &quote;, \", and \Q \E, but none of
> these options has
> > worked.
> > 
> > I was not aware of the regexp option.
> 
> untested, try with =
> 
>     <replace file="${env.DOMAINDIR}/bin/setDomainEnv.${fileext}"
>    token='JAVA_OPTIONS="${JAVA_OPTIONS}"'
>    value='JAVA_OPTIONS="${JAVA_OPTIONS}"
> -Dweblogic.ProductionModeEnabled=${WEBLOGIC_PRODUCTION_MODE}'/>
> 
> if that doesn't work, i would go with regexp

The HTML entity for " is &quot;, not &quote;
(http://www.w3.org/TR/html401/sgml/entities.html#h-24.4.1). Did the OP
have a typo in his e-mail, or did he try the wrong entity?
--
Rick Genter
Principal Software Engineer
Silverlink Communications

---------------------------------------------------------------------
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