diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
index f0b4bbaa7..7b91152f7 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
@@ -242,6 +242,7 @@ public class ReplaceRegExp extends Task {
* want to only replace the first occurrence of a regular expression on
* each line, which is not easy to do when processing the file as a whole.
* Defaults to false.
+ * @deprecated - use setByLine(boolean)
*/
public void setByLine(String byline) {
Boolean res = Boolean.valueOf(byline);
@@ -252,6 +253,17 @@ public class ReplaceRegExp extends Task {
this.byline = res.booleanValue();
}
+ /**
+ * Process the file(s) one line at a time, executing the replacement
+ * on one line at a time. This is useful if you
+ * want to only replace the first occurrence of a regular expression on
+ * each line, which is not easy to do when processing the file as a whole.
+ * Defaults to false.
+ */
+ public void setByLine(boolean byline) {
+ this.byline = byline;
+ }
+
/**
* Specifies the encoding Ant expects the files to be in -