ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Herry Koh" <herry...@yahoo.com>
Subject RE: Regular Expression for Enhanced Replace Task
Date Mon, 10 Sep 2001 13:41:50 GMT
Hi,
unfortunately the value is a literal one. The regreplace task is 
designed to be simple (my own excuse for laziness) as I code this 
in just one night's work.
I will definitely take your suggestion into consideration as I 
continue to work on this. Unfortunately since this is just a hobby 
(i.e. I still have a day job and a life), this might take sometime :)

However, since this is the open source and I have included the 
source code in the distrubution, please feel free to enhance it as 
you like, but of course, I would appreciate it if you can send me the 
enhancement as a courtesy. :)

Thanks for taking an interest.

Cheers,
Herry.

On 10 Sep 2001, at 15:12, Marc van Grootel (Mendez Nederland) wrote:

> Hi,
> 
> Thanks for this task, I was looking for something like that.
> My Java programming knowledge is minimal and I don't know
> the Regexp package very well but I was under the impression
> that I could use backreferences in the replacement value
> (value attribute) so that I could do something like:
> 
>   <target name="foo">
>       <regreplace basedir="${basedir}"
>                   filename="foo.txt" 
>                   regexp="(foo)(bar)"
>                   value="foo\1"/>
>   </target>
> 
> Alas, the value is used literally so "foobar" gives "foo\1" instead
> of "foofoo".
> Is this intentional, or could this be added?
> 
> Cheers,
> 
> --Marc
> 
> > -----Original Message-----
> > From: Herry [mailto:herrykoh@yahoo.com]
> > Sent: Sunday, September 09, 2001 7:11 PM
> > To: ant-user@jakarta.apache.org
> > Subject: Regular Expression for Enhanced Replace Task
> > 
> > 
> > Hi all,
> > I have been working on a little personal project to
> > enhance the current 'replace' task with regular
> > expression, please find below the URL links to my
> > source and binary files ( apologies about the cheesy
> > website as tbis is my hobby, therefore, I am using a
> > non-commercial i.e. free website hosting service :)  )
> > http://herrykoh.topcities.com/projects/index.html
> > 
> > Please note that since I am using the Jakarta's Regexp
> > package for the regular expression parsing, you will
> > have to include the RegExp from the Jakarta Apache's
> > website in order to use this task
> > 
> > Just go to the RegReplace section to download the
> > source and binary and examples.
> > 
> > Since this is not a default task, you will need to use
> > taskdef to define this task (see examples on the site)
> > 
> > Please let me know if you have any comments
> > 
> > Cheers,
> > Herry.
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Y! Pages - Search or browse for business listings.
> > http://yp.yahoo.com.sg/
> > 



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Mime
View raw message