ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/docs/manual/OptionalTasks replaceregexp.html
Date Wed, 30 Jan 2002 21:32:08 GMT
sbailliez    02/01/30 13:32:08

  Modified:    docs/manual/OptionalTasks replaceregexp.html
  Log:
  Add a note to users so that they are aware of this cross platform
  problem for line terminator and the differences between
  regular expressions libraries.
  
  Revision  Changes    Path
  1.3       +21 -5     jakarta-ant/docs/manual/OptionalTasks/replaceregexp.html
  
  Index: replaceregexp.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/OptionalTasks/replaceregexp.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- replaceregexp.html	10 Jan 2002 08:48:31 -0000	1.2
  +++ replaceregexp.html	30 Jan 2002 21:32:08 -0000	1.3
  @@ -17,11 +17,27 @@
   type mappers</a> this task needs a supporting regular expression
   library and an implementation of
   <code>org.apache.tools.ant.util.regexp.Regexp</code>.  Ant comes with
  -implementations for 
  -<a href="http://java.sun.com/j2se/1.4/docs/api/java/util/regex/package-summary.html"
target="_top">the java.util.regex package of JDK 1.4</a>, 
  -<a href="http://jakarta.apache.org/regexp/" target="_top">jakarta-regexp</a>

  +implementations for
  +<a href="http://java.sun.com/j2se/1.4/docs/api/java/util/regex/package-summary.html"
target="_top">the java.util.regex package of JDK 1.4</a>,
  +<a href="http://jakarta.apache.org/regexp/" target="_top">jakarta-regexp</a>
   and <a href="http://jakarta.apache.org/oro/" target="_top">jakarta-ORO</a>,
   but you will still need the library itself.</p>
  +<p>
  +<i>
  +There are cross-platform issues for matches related to line terminator.
  +For example if you use $ to anchor your regular expression on the end of a line
  +the results might be very different depending on both your platform and the regular
  +expression library you use. It is 'highly recommended' to tests your pattern on
  +Unix and Windows platforms before you rely on it.
  +<ul>
  +    <li>Jakarta Oro defines a line terminator as '\n' and is consistent with Perl.</li>
  +    <li>Jakarta RegExp uses a system-dependant line terminator.</li>
  +    <li>JDK 1.4 uses '\n', '\r\n', '\u0085', '\u2028', '\u2029' as a default
  +    but is configured in the wrapper to use only '\n' (UNIX_LINE)</li>
  +</ul>
  +It is <b>strongly</b> recommended to use Jakarta Oro.
  +</i>
  +</p>
   
   <h3>Parameters</h3>
   <table border="1" cellpadding="2" cellspacing="0">
  @@ -67,7 +83,7 @@
     </tr>
   </table>
   <h3>Examples</h3>
  -<pre>  &lt;replaceregexp file=&quot;${src}/build.properties&quot; 
  +<pre>  &lt;replaceregexp file=&quot;${src}/build.properties&quot;
                            match=&quot;OldProperty=(.*)&quot;
                            replace=&quot;NewProperty=\1&quot;
                            byline=&quot;true&quot; /&gt;
  @@ -76,7 +92,7 @@
    with &quot;NewProperty&quot; in a properties file, preserving the existing
   value, in the file <code>${src}/build.properties</code></p>
   <h3>Parameters specified as nested elements</h3>
  -<p>This task supports a nested <a href="../CoreTypes/fileset.html">FileSet</a>

  +<p>This task supports a nested <a href="../CoreTypes/fileset.html">FileSet</a>
      element.</p>
   <p>This task supports a nested <i>RegularExpression</i> element to specify
      the regular expression.  You can use this element to refer to a previously
  
  
  

--
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