ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: replaceregexp- help
Date Mon, 03 May 2004 14:59:46 GMT
Maybe it would better to change to something like @port@. Then you´ll get a
template
which can be used for <filterchains> to replace the @port@ with the value of
an Ant
property (e.g. port=9999) while doing file operations (copy, zip, ...).

Without trying something I would start with an regexp like
    match     (&lt;mbean code=.package\.Task4.*Port.&gt;)(.*)(&lt;)
    replace   \1${port}\3


Jan
    

> -----Original Message-----
> From: Sylwester Lesniak [mailto:tycoonek@yahoo.com]
> Sent: Monday, May 03, 2004 4:42 PM
> To: user@ant.apache.org
> Subject: replaceregexp- help
> 
> 
> Hi All, 
>  
> I am using Ant (1.5.3), jdk 1.4.1_02,
> and have a file like:
> 
>   <mbean code="package.Task4"
>          name="service=Naming">
>     <attribute name="Port">9999</attribute>
>   </mbean>
> 
> and want to change the port number to XXXX using
> replaceregexp, so I can get back:
> 
>   <mbean code="package.Task4"
>          name="service=Naming">
>     <attribute name="Port">XXXX</attribute>
>   </mbean>
> 
> I need a 'match' attribute to be started with: 
> <mbean code="package.Task4"...
> 
> 
> Can any body give me some suggestions,
> 
> thank you
> Sylwester
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs  
> http://hotjobs.sweepstakes.yahoo.com/careermakeover 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message