DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26901>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26901

regex with file mapper incorrectly handles ${file.separator}





------- Additional Comments From [EMAIL PROTECTED]  2004-02-13 09:37 -------
Blame billy for this.
The \ was chosen as a directory separator for dos althought it had
for a number of years been used as a escape character in C and also
in ed. The regular expressions in ed spread over the years to emacs, perl
and python retaining \ as an escape character.

The documentation for mapper is correct for most of the mapper types,
but not for the specific regex mapper.

In dos / may also be used as a directory separator so the following
will work in a platform independent (well dos, unix and mac) fashion:

<copy todir="NewRoot">
  <mapper type="regexp" 
    from="(.*?).src.scripts.(.*)" 
    to="\1/\2"/> 
  <fileset dir="Root">
    <include name="**/src/scripts/*"/>
  </fileset>
</copy>

However this does not work for the "from" field in a regex mapper

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to