diff --git a/WHATSNEW b/WHATSNEW index 951f7c376..bf247d839 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -48,6 +48,8 @@ on log output. * works on all files in parallel and supports multiple filesets. +* can now use tokens and/or values that cross line boundaries. + Fixed bugs: ----------- diff --git a/docs/index.html b/docs/index.html index e7aae28d5..701841c96 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2616,6 +2616,8 @@ implementations may use other values for the home directory on Windows.

Description

Replace is a directory based task for replacing the occurrence of a given string with another string in selected file.

+

If you want to replace a text that crosses line boundaries, you +must use a nested <replacetoken> element.

Parameters

@@ -2638,7 +2640,8 @@ in selected file.

- + @@ -2681,6 +2684,30 @@ in selected file.

  <replace file="${src}/index.html" token="@@@" value="wombat" />

replaces occurrences of the string "@@@" with the string "wombat", in the file ${src}/index.html.

+

Parameters specified as nested elements

+

If either the text you want to replace or the replacement text +cross line boundaries, you can use nested elements to specify +them.

+

Examples

+
  
+<replace dir="${src}" value="wombat">
+  <include name="**/*.html" />
+  <replacetoken><[CDATA[multi line
+token]]></replacetoken>
+</replace>
+
+

replaces occurrences of the string "multi +line\ntoken" with the string "wombat", in all +HTML files in the directory ${src}.Where \n is +the platform specific line separator.

+
  
+<replace file="${src}/index.html">
+  <replacetoken><[CDATA[two line
+token]]></replacetoken>
+  <replacevalue><[CDATA[two line
+token]]></replacevalue>
+</replace>
+

Rmic

Description

token the token which must be replaced.YesYes, unless a nested replacetoken + element is used.
value