Browse Source

Merge fix for bug 17660 from 1.5 branch

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274278 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
7deabb5cab
1 changed files with 20 additions and 0 deletions
  1. +20
    -0
      docs/manual/OptionalTasks/replaceregexp.html

+ 20
- 0
docs/manual/OptionalTasks/replaceregexp.html View File

@@ -128,6 +128,26 @@ value, in the file <code>${src}/build.properties</code></p>
with &quot;NewProperty&quot; in a properties file, preserving the existing
value, in all files ending in <code>.properties</code> in the current directory</p>

<blockquote>
<pre>&lt;replaceregexp match="\s+" replace=" " flags="g" byline="true"&gt;
&lt;fileset dir="${html.dir}" includes="**/*.html" /&gt;
&lt;/replaceregexp&gt;
</pre></blockquote>
<p>replaces all whitespaces (blanks, tabs, etc) by one blank remaining the
line separator. So with input

<blockquote>
<pre>
&lt;html> &lt;body&gt;
&lt;&lt;TAB&gt;&gt;&lt;h1&gt; T E S T &lt;/h1&gt; &lt;&lt;TAB&gt;&gt;
&lt;&lt;TAB&gt;&gt; &lt;/body&gt;&lt;/html&gt;
</pre></blockquote>
would converted to
<pre>
&lt;html&gt; &lt;body&gt;
&lt;h1&gt; T E S T &lt;/h1&gt; &lt;/body&gt;&lt;/html&gt;
</pre>

<hr>
<p align="center">Copyright &copy; 2001-2003 Apache Software Foundation. All rights
Reserved.</p>


Loading…
Cancel
Save