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 Thu, 16 Jan 2003 18:54:35 GMT
Stephan,
What I am trying to do is to use a command template file and looking for the
marker and substitute it with a set PATH.
Here is the code nip of my <replaceregexp>

<target name="doregexp" depends="init" description="substitute the path into
the cmd file">
 <replaceregexp
      file="${MYDir}/mycommand.cmd">
      <regexp pattern=":_insertpathhere"/>
      <substitution expression="@rem My path &#x0A;
           set MY_HOME=@ROOT@#x5c;mybindir"/>
 </replaceregexp>
</target>

Here is the piece of the template I am using:

:_insertpathhere

Here is the output I expect to have in the command file under
${MYDir}/mycommand.cmd
@rem My path
set MY_HOME=@ROOT\mybindir

What I got with the about <replaceregexp> is
@rem My path
set MY_HOME=@ROOTmybindir


Hope these are making sense to you.

Thank you very much,

Bin


-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: Thursday, January 16, 2003 12:17 AM
To: ant-user@jakarta.apache.org
Subject: Re: Help with Replace regexp with ant 1.5


On Wed, 15 Jan 2003, Bin Chen <binchen@bea.com> wrote:

> Running with -debug flag, ant did give the message of substituted
> pattern "\" as expected, but the output still did have "\" shown. Is
> this a bug?

Could you give us the complete <replaceregexp> task you use, a sample
of what you want to translate, what you want as output and what you
actually get?

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message