Home| Design| License| Regex| Download| Credits| Contact
Text-Zap Info
› Overview› Text-Zap Ant Task› Expand Text-Zap› API Docs
› Filters› Savers› Groupers› Sequencers
› Append Filter› Append File Filter› Extract Lines Filter› Find Filter› Insert References› Merge Filter› Replace Filter› Replace List Filter› Replace Filter Plus› Reverse Filter› Split By Regex Filter› XSLT Filter

Replace Filter Plus

ReplaceFilterPlus is an abstract filter. It cannot be used unless it is implemented. Although I only list concrete filters on this page I chose to include the ReplacePlusFilter because of the power a flexibility that it adds to Text-Zap.

The purpose of ReplaceFilterPlus is to perform some action other that direct replacment to a regex. For exampled I've used it from translation, numeric conversion and the ChangeCaseFilter supplied with Text-Zap.

Here are the basics of how to create a ReplaceFilterPlus.

  1. Create a class that extends ReplaceFilterPlus.
  2. Implement the modifiedReplacment function. (Be sure that it returns a string.)
  3. Compile the class and use it in a Text-Zap Task within a build file.


These parameters are available to any filter built on ReplaceFilterPlus.
regexthe regex to be searched forYes
modifyGroupthe capturing group to be modified by the filterNo, defaults to 0 which is the entire regex
preGroupthe capturing group that should be placed before the modifyGroup in the new outputNo
postGroupthe capturing group that should be placed after the modifyGroup in the new outputNo
Any other parameters defined by the filter
SourceForge.net Logo