ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Proposed fix for ReplaceRegExp.java
Date Wed, 26 Jun 2002 16:43:40 GMT
Currently, there doesn't seem to be any way to actually delete a line
using <replaceregexp> -- the best you can do is end up with a blank line.
To get it to delete the line if the result is empty involves just a small
change:
289,291c289
<                     if (res.trim().length() != 0) { // non-blank line
<                         pw.println(res);
<                     }
---
>                     pw.println(res);
313,315c311
<                 if (res.trim().length() != 0) { // non-blank line
<                     pw.println(res);
<                 }
---
>                 pw.println(res);

Do people agree this should be the default behaviour? I think it should
be, but maybe you'd prefer also adding an attribute that says whether to
do it this way or leave the replacement as a blank line? (If you would,
suggestions for what to call it, please.)

Thanks,
Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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


Mime
View raw message