From 9c0ef01928a8ecfe25110c8a4778543296d4da6b Mon Sep 17 00:00:00 2001
From: Stefan Bodewig from
pattern will be ignored.
Both to
and from
are required and define regular
-expressions. If the source file name matches the from
-pattern, the target file name will be constructed from the
+
+
Both to
and from
are required and define
+regular expressions. If the source file name (as a whole or in part)
+matches the from
pattern, the target file name will be
+constructed from the
to
pattern, using \0
to \9
as
-back-references for the full
-match (\0
) or the matches of the subexpressions in
-parentheses.
-Source
-files not matching the from
pattern will be ignored.
\0
) or the matches of
+the subexpressions in parentheses. The to
pattern
+determines the whole file name, so if you wanted to
+replace the extension of a file you should not use from="\.old$"
+to=".new"
but rather from="(.*)\.old$" to="\1.new"
+(or rather use a glob mapper in this case).
+
+Source files not matching the from
pattern will be
+ignored.
Note that you need to escape a dollar-sign ($
) with
another dollar-sign in Ant.
The regexp mapper needs a supporting library and an implementation