You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Vidhya <vi...@siptech.co.in> on 2003/02/25 12:35:23 UTC
Enhanacement for Replace Task
Hi,
Herewith I am submitting the enhanced code of Replace task .The
existing replace task has the functionality to replace all occurrences
of the string specified in the 'token' attribute .
The enhanced code adds the following functionality's.
1.'firstoccurence' can be true/false ,default value is false. Only the
first occurrence of the string gets replaced .
2. 'lastoccurence' can be true /false ,default value is false. Only
the lastoccurence of the string gets replaced .
3.'nthoccurence' attribute takes an integer value If the int value is
4 , the fourth occurrence of the string gets replaced
4. 'fromline ' and ' toline' attributes applies the replace task
functionality to a specified portion of the file.
e.g.; if fromline ='4' and toline='7' , the replacement occurs only
between line 4 and 7 .
Please find the enhanced code attached along with this. I would be nice
if you let me know the status after review.
Thanks and regards
C.S.Vidhya
SIP Technologies and Exports Ltd. Chennai, India
Re: Enhanacement for Replace Task
Posted by Jesse Stockall <je...@cryptocard.com>.
On Tuesday, February 25, 2003, at 06:35 AM, Vidhya wrote:
>
> Please find the enhanced code attached along with this. I would be
> niceĀ if you let me know the status after review.
Create an enhancement request in Bugzilla
http://issues.apache.org/bugzilla/enter_bug.cgi?product=Ant and attach
a patch (not the complete file). This will ensure that your work does
not get lost. Also, please post in plain text.
Jesse Stockall - jesse@cryptocard.com
CRYPTOCard Corp.