Maybe it would better to change to something like @[EMAIL PROTECTED] 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:[EMAIL PROTECTED]
> Sent: Monday, May 03, 2004 4:42 PM
> To: [EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to