ReplaceRegExp is a directory based task for replacing the occurrence of a given regular expression with a substitution pattern in a selected file or set of files.
Similar to regexp type mappers this task needs a supporting regular expression library and an implementation of org.apache.tools.ant.util.regexp.Regexp. Ant comes with implementations for the java.util.regex package of JDK 1.4, jakarta-regexp and jakarta-ORO, but you will still need the library itself.
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' that you test your pattern on both Unix and Windows platforms before you rely on it.