bodewig 2003/03/19 00:41:29
Modified: docs/manual/OptionalTasks Tag: ANT_15_BRANCH replaceregexp.html Log: Add another example to replaceregexp's docs. PR: 17660 Submitted by: Jan Matèrne <jan at materne dot de> Revision Changes Path No revision No revision 1.8.2.4 +21 -1 ant/docs/manual/OptionalTasks/replaceregexp.html Index: replaceregexp.html =================================================================== RCS file: /home/cvs/ant/docs/manual/OptionalTasks/replaceregexp.html,v retrieving revision 1.8.2.3 retrieving revision 1.8.2.4 diff -u -r1.8.2.3 -r1.8.2.4 --- replaceregexp.html 4 Sep 2002 11:21:14 -0000 1.8.2.3 +++ replaceregexp.html 19 Mar 2003 08:41:29 -0000 1.8.2.4 @@ -123,8 +123,28 @@ with "NewProperty" in a properties file, preserving the existing value, in all files ending in <code>.properties</code> in the current directory</p> +<blockquote> +<pre><replaceregexp match="\s+" replace=" " flags="g" byline="true"> + <fileset dir="${html.dir}" includes="**/*.html" /> +</replaceregexp> +</pre></blockquote> +<p>replaces all whitespaces (blanks, tabs, etc) by one blank remaining the +line separator. So with input + +<blockquote> +<pre> +<html> <body> +<<TAB>><h1> T E S T </h1> <<TAB>> +<<TAB>> </body></html> +</pre></blockquote> +would converted to +<pre> +<html> <body> + <h1> T E S T </h1> </body></html> +</pre> + <hr> -<p align="center">Copyright © 2001-2002 Apache Software Foundation. All rights +<p align="center">Copyright © 2001-2003 Apache Software Foundation. All rights Reserved.</p> </body>