The ReplaceRegexp
filter will perform a regexp find/replace on the
input stream. For example, if you want to replace ANT with Phing (ignoring case) and you
want to replace references to *.java with *.php:
<filterchain> <replaceregexp> <regexp pattern="ANT" replace="Phing" ignoreCase="true"/> <regexp pattern="(\w+)\.java" replace="\1.php"/> </replaceregexp> </filterchain>
Or, replace all Windows line-endings with Unix line-endings:
<filterchain> <replaceregexp> <regexp pattern="\r(\n)" replace="\1"/> </replaceregexp> </filterchain>